VB6 ACCESS database Connection Query

Reply

Join Date: Aug 2007
Posts: 4
Reputation: pburk is an unknown quantity at this point 
Solved Threads: 0
pburk pburk is offline Offline
Newbie Poster

VB6 ACCESS database Connection Query

 
0
  #1
Nov 20th, 2007
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
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 2,080
Reputation: debasisdas will become famous soon enough debasisdas will become famous soon enough 
Solved Threads: 124
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Postaholic

Re: VB6 ACCESS database Connection Query

 
0
  #2
Nov 20th, 2007
You should be able to work with that one. There is no such restriction.
Share your Knowledge.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 4
Reputation: pburk is an unknown quantity at this point 
Solved Threads: 0
pburk pburk is offline Offline
Newbie Poster

Re: VB6 ACCESS database Connection Query

 
0
  #3
Nov 20th, 2007
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
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 2,080
Reputation: debasisdas will become famous soon enough debasisdas will become famous soon enough 
Solved Threads: 124
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Postaholic

Re: VB6 ACCESS database Connection Query

 
0
  #4
Nov 22nd, 2007
If still there is any problem then let me know.
Share your Knowledge.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 1
Reputation: vijaykumar_sajj is an unknown quantity at this point 
Solved Threads: 0
vijaykumar_sajj vijaykumar_sajj is offline Offline
Newbie Poster

Re: VB6 ACCESS database Connection Query

 
0
  #5
Nov 13th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 2,080
Reputation: debasisdas will become famous soon enough debasisdas will become famous soon enough 
Solved Threads: 124
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Postaholic

Re: VB6 ACCESS database Connection Query

 
0
  #6
Nov 13th, 2008
please do not hijack others threads .
Please stasrt a new thread of your own for starting a new discussion.
Share your Knowledge.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC