Newbie Queston: ADO with 2 MDB's

R

richmarin

I wanted to split two Access MDB's. One MDB will run locally as the
client. The other MDB will be on the network. My question is how does
the client connect to the server data. Here is my code.

Dim rsClient as ADODB.recordset

Set rsClient = New ADODB.recordset

rsClient.Open "Select * From tblClients", < what do I put here ??? >
 
D

Dave Patrick

You link the front end to the back end via linked tables.
http://support.microsoft.com/?kbid=304932


In answer to your question about ADO;

Dim cnn As ADODB.Connection
Dim rs1 As ADODB.Recordset
Dim strSQL1 As String
Dim strConn As String
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=C:\Program Files\Microsoft Office" _
& "\OFFICE11\SAMPLES\Northwind.mdb;" _
& "Persist Security Info=False"
Set cnn = New ADODB.Connection
cnn.Open strConn
Set rs1 = New ADODB.Recordset
Set rs2 = New ADODB.Recordset
strSQL1 = "SELECT CustomerID, " _
& "CompanyName, ContactName " _
& "FROM Customers; "

rs1.Open strSQL1, cnn, adOpenDynamic, adLockOptimistic
rs1.MoveFirst
Do While rs1.EOF = False
'Do some stuff here
rs1.MoveNext
Loop
rs1.Close
cnn.Close


--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

|
|
| I wanted to split two Access MDB's. One MDB will run locally as the
| client. The other MDB will be on the network. My question is how does
| the client connect to the server data. Here is my code.
|
| Dim rsClient as ADODB.recordset
|
| Set rsClient = New ADODB.recordset
|
| rsClient.Open "Select * From tblClients", < what do I put here ??? >
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top