Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Server Objects

Status
Not open for further replies.

JackD4ME

Programmer
Jun 4, 2002
228
US
Hi All,
The problem I am running into seems to point to this but I am not positive. I am trying to create a second adodb server object to connect to a second db on the same page.

First connection (no problems):
set conn = server.createobject("adodb.connection")
DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "
DSNtemp=dsntemp & "DBQ=" & server.mappath("test.mdb")
conn.Open DSNtemp

Second Connection:
folder=Left(sRst("Class ID"), Len(sRst("Class ID"))-1)
set conn2 = server.createobject("adodb.connection")
DSNtemp2="DRIVER={Microsoft Access Driver (*.mdb)}; "
DSNtemp2=dsntemp2 & "DBQ=" & server.mappath(folder & "\" & folder & ".mdb")
conn2.Open DSNtemp2

The "folder" var holds a folder name with a corresponding db. This code is in a while loop and closes at the end of it. The folder var is correct, it has been tested.

Here is the error I keep getting:
General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x9a0 Thread 0xa64 DBC 0x2e6dfec Jet'.

Is there a problem with creating more than one connection?

Thanks,
Jack D
 
Haven't seen this: I have a site that opens (more than 2) connections and it works OK (IIS5.5; MDAC 2.7).

[tt]________________________________________________________________
[pc2]Roger
Life is a game of cards in which the deck contains only jokers.[/tt]
 
Is it possible that it does not like the fact connection 2 goes to a sub-folder?
 
Nevermind...I was programming this at 1 in the morning. I shoulda had some Jack! It does not have a problem with locating folders or the db w/in them as long as the name of the db is CORRECT!!! Thanks though :)

Jack D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top