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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Very simple database connection - but error

Status
Not open for further replies.

bunnyweb

MIS
Jan 13, 2003
42
IE
Hi All,

I am having problems with my database connection. I have two computers, one running Win XP with MS Access 2002. The second computer is running Win 2000 with MS Access 2002.

My application works perfectly on my Win XP machine, but keeps giving me an error message on my Win 2000 machine. So I created a very simple ASP page to make a very simple database connection. But it still crashes on Win 2000. Does anyone know what might be causing my problem? Here is my test page:


--------------------------------------------------

<%
Dim adoCon
Set adoCon = Server.CreateObject(&quot;ADODB.Connection&quot;)

dbPath = &quot;C:\safepassdb.mdb&quot;

adoCon.ConnectionString=&quot;DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=&quot; & dbPath & &quot;; Password=simpson&quot;

adoCon.Open

Dim rsStaffName
Set rsStaffName = Server.CreateObject(&quot;ADODB.Recordset&quot;)
rsStaffName.Open &quot;SELECT * FROM tblStaff&quot;, adoCon

While NOT rsStaffName.EOF
response.write rsStaffName(&quot;staffFirstName&quot;) & &quot;<BR>&quot;
rsStaffName.movenext
Wend

rsStaffName.Close
Set rsStaffName = Nothing

%>
--------------------------------------------------

The following error is occurring on line 12, which is the line:

adoCon.Open

Here is the error message:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x228 Thread 0x504 DBC 0x145c024 Jet'.
/safeweb/dbtest.asp, line 12


Why does this work on Win XP but not on Win 2000? It doesn't make any sense.

I also did a test ASP page that simply outputs the date to test IIS on the Win 2000 server, and that works fine, so I know that IIS is running properly at least.

Any help or hints would be greatly appreciated! Thank you!
 
I know it sounds silly, but make sure that the DB is in the same location on both PCs.

Are your security settings the same on both sites' IIS?

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook
 
Thanks for responding so quickly.

Yes, I am 100% positive that the database is in the same location on both computers.

I'm not sure what security setting to look at in IIS. Any suggestions?

Thank you!
 
&quot;FP: Error: Unable to Open Jet Temporary Key When You Attempt to Connect to Database&quot;

then

&quot;HOW TO: Troubleshoot ASP in IIS 5.0&quot;

and finally

&quot;PRB: Configured Identity Is Incorrect for IWAM Account&quot;


Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top