ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 3rd, 2003, 03:34 PM
rhosking rhosking is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: New Zealand
Posts: 1 rhosking User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to rhosking Send a message via AIM to rhosking Send a message via Yahoo to rhosking
multiple database connection conflicts

Hi there.

Im running my site off brinkster, so I cannot use a global.asa file so instead I have a global.asp file which runs if the global.asa file does not. I have a database connection in my global.asp file, because it is an mock e-commerce site and I check to see if my users have been to the site before and pull their username and other information out of my database. But since my global.asp file isnt like an .asa one and isnt exactly global (it only runs once at the very start) I have another file called dbconnect.asp which is included at the top of every file that needs to connect to the database.

Now heres the problem, when I first load my index page I get this error here which is to do with my database connection in my global.asp file:


Quote:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x117c Thread 0xa3c DBC 0x18fb7004 Jet'.

/rosalieh/global.asp, line 23


Here is line 23 of global.asp:

Quote:
oCon.Open dbSt


Its my database connection, and the code for it to connect, which is above that reads as follows:

Quote:
Dim dbSt, oCon, oRST

Set oRST = Server.CreateObject("ADODB.Connection")
Set oCon = Server.CreateObject("ADODB.Connection")

dbSt = "Driver={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & Server.MapPath("/db/db.mdb") & ";"


Now you may think that I may get the error because I have named my varibles the same in my dbconnect.asp file, but I havent, they are called Dim strDBConnect, oConn.

My code in the dbconnect.asp file reads as follows:

Quote:
Set oConn = Server.CreateObject("ADODB.Connection")

strDBConnect = "Driver={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & Server.MapPath("db/db.mdb") & ";"

oConn.Open strDBConnect


Now when I refresh the index page, it seems to load up and work perfectly. But its just the very first time you go there that this error comes up. I presume it is a conflict between my database connections, is there anyway to fix this so I get rid of the error?

Reply With Quote
  #2  
Old November 3rd, 2003, 09:10 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,829 Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 20 h 23 m 12 sec
Reputation Power: 765

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > multiple database connection conflicts


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway