Forum Moderators: open

Message Too Old, No Replies

Access database - 80004005 error - DSN

         

ProBowlUK

11:03 pm on Jul 1, 2005 (gmt 0)

10+ Year Member



My website is www.example.com

It was working fine a week ago, but <my host> moved it to their servers and there is a slightly different file structure.

Example.com
..... db
..... logs
..... wwwroot

Now I'm getting a DSN error from www.example.com/testpage.asp

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 0x61c Thread 0x1b0c DBC 0x3635014 Jet'.

/testpage.asp, line 71

I have tried to change the source of Server.MapPath in numerous ways.

If anyone has a clue, feel free to 'View Source' from your browser.

best regards

Bob Sharp

[edited by: Woz at 1:43 am (utc) on July 2, 2005]
[edit reason] Examplified Code [/edit]

mrMister

11:24 pm on Jul 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'd remove all the URLs in your post if I were you, the mods are likely to get angry with you.

Quick fix would be to stop using a DSN and reference the .mdb file directly in your connection string.

eg.

connStr = "Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\db\mydatabase.mdb;Uid=Admin;Pwd=;"

Performance should be slightly quicker that way too.

Of course long term, you want to be thinking seriously about who you host with. You get what you pay for in the hosting business, and you're paying next to nothing.

You can only expect this kind of trouble if you cut corners on hosting.

ProBowlUK

6:58 am on Jul 2, 2005 (gmt 0)

10+ Year Member



Hi mrMister

Thanks for posting a reply so quickly.

Did you have a close look at my code?
I think it is actually a DSN-less connection.
"linksDSN" is just a simple string.

It's only the error that mentions "DSN"

The basic code for this website was written
over 6 years ago and worked fine till last week.

wingnut

6:31 pm on Jul 3, 2005 (gmt 0)

10+ Year Member



Not being a coder this may be completely wrong. Server.MapPath won't work as it is the virtual path from the sites root folder. From your file structure the db folder lies outside this so you will have to use the physical path as mrMister said. This can be found using an asp path with returns the environemtal specs for the hosting. From this you will be able to work out the path to the db and ultimately update you connection string.

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" width="750">
<tr>
<td valign="top" align="left" width="150"><font face="Arial" size="2" color="#FF0000"><b>Variable Name</b></font></td>
<td valign="top" align="left" width="600"><font face="Arial" size="2"><b>Value</font></b></td>
</tr>
<%
for each name in request.servervariables
%>
<tr>
<td valign="top" align="left" width="150">
<font face="Arial" size="1" color="#FF0000">
<%= name %></font></td>
<td valign="top" align="left" width="600">
<font face="Arial" size="1"><%= request.servervariables(name) %></font></td>
</tr>

<%
Next
%>
</table>
</div>
</body>
</html>