943,962 Members | Top Members by Rank

Ad:
Nov 20th, 2007
0

VB6 ACCESS database Connection Query

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
pburk is offline Offline
4 posts
since Aug 2007
Nov 20th, 2007
0

Re: VB6 ACCESS database Connection Query

You should be able to work with that one. There is no such restriction.
Featured Poster
Reputation Points: 665
Solved Threads: 427
Posting Genius
debasisdas is offline Offline
6,406 posts
since Feb 2007
Nov 20th, 2007
0

Re: VB6 ACCESS database Connection Query

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
pburk is offline Offline
4 posts
since Aug 2007
Nov 22nd, 2007
0

Re: VB6 ACCESS database Connection Query

If still there is any problem then let me know.
Featured Poster
Reputation Points: 665
Solved Threads: 427
Posting Genius
debasisdas is offline Offline
6,406 posts
since Feb 2007
Nov 13th, 2008
0

Re: VB6 ACCESS database Connection Query

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
vijaykumar_sajj is offline Offline
1 posts
since Nov 2008
Nov 13th, 2008
0

Re: VB6 ACCESS database Connection Query

please do not hijack others threads .
Please stasrt a new thread of your own for starting a new discussion.
Featured Poster
Reputation Points: 665
Solved Threads: 427
Posting Genius
debasisdas is offline Offline
6,406 posts
since Feb 2007
Sep 6th, 2010
0
Re: VB6 ACCESS database Connection Query
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?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Bhanu Aggarwal is offline Offline
1 posts
since Sep 2010
Sep 13th, 2010
0
Re: VB6 ACCESS database Connection Query
how to get data from RFID using vb..
Reputation Points: 10
Solved Threads: 0
Newbie Poster
saintinblack is offline Offline
1 posts
since Sep 2010
Oct 3rd, 2010
0
Re: VB6 ACCESS database Connection Query
how to display the contents of msaccess table in the text boxes of vb6.0?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
geethasethu is offline Offline
1 posts
since Oct 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Excel Automation (null): The server threw an exception
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: VB 6 Software Requirements





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC