0

VB6Query20071120.doc

Hi

VB6

I am trying to have 2 ACCESS databases open at the same time in order to populate the 2nd one with data from the first one. The problem is that it appears that I can only have one connection to a database at a time. Is this true and how do I get around this ? So the code below does not work when the program pointer gets to the destination connection unless I’ve closed the Source connection. If I do that then I can no longer talk to the Source recordset ! If I leave the source connection open while trying to talk to the destination connection I’m actually manipulating the Source connection.

Many thanks

Peter Burkimsher

pburk@fnb.co.za

‘PathD = path and Source database name
‘ PathE = path and Destination database name

Dim SourceAccConnection As New ADODB.Connection
Dim rsInputRead As New ADODB.Recordset

Dim DestAccConnection As New ADODB.Connection
Dim rsDestRead As New ADODB.Recordset


SourceAccConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = " & PathD & ";"

rsInputRead.Open "SELECT * FROM Runtime " _
& "ORDER BY Date , Priority, Description ;", SourceAccConnection, adOpenKeyset, adLockOptimistic


DestAccConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = " & PathE & ";"

rsDestRead.Open "SELECT * FROM Runtime " _
& "ORDER BY Date , Priority, Description ;", SourceAccConnection, adOpenKeyset, adLockOptimistic

6
Contributors
8
Replies
11
Views
9 Years
Discussion Span
Last Post by geethasethu
0

Many thanks for your time. I will be giving it another try tonight ( It's now 15h30 my time) .

I agree there should be no such restriction but I seemed to be experiencing it last night.

thanks again

Peter B.

pburk@fnb.co.za

0

i have problem in visual basic 6 i am using microsoft access i created one query in access query is not opend from visual basic 6

0

please do not hijack others threads .
Please stasrt a new thread of your own for starting a new discussion.

0

hiiiiiiii!i have created a table in vb using adodc control & visual data manager.now i want to update that table by using vb commands .and i want to compare two values in two forms in same vb project.can u plz help?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.