Database connectivity - TechRepublic
General discussion
May 21, 2004 at 12:46 AM
johnsamuel1

Database connectivity

by johnsamuel1 . Updated 22 years, 1 month ago

Sir,
I have a doubt.
It is concerning visual basic.
i am building an application.it also involves database connectivity using ado.i use MsAccess.
my database is situated in one computer.We have a network connection.I HAVE TOO RUN THIS APPLICATION in another computer without transfering the database to that computer.
so in datasource argument,how will yo give the path.
for example think my database db1 is situated in the c folder of computer safe1(the name used to log in to this computer).
i have to run the application in safe2 computer without transfering db1 to safe2(the name used to log in to this computer).
how will you give the path of datasource argument.
Sample Code i am using:

Dim cnn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cnn = New ADODB.Connection
cnn.Open “Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\My Documents\john\db1.mdb;”
This code works OK because the db1.mdb is situated in the same computer where application resides. I want to know the path string to be given when db1.mdb resides in another computer say safe2(the name used to log in to this computer).

This discussion is locked

All Comments