Cannot query Access db on server

J

James Houston

I get the following error message


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 0x940 Thread 0xb04
DBC 0x9266f84 Jet'.

/test.asp, line 87

when I try to open test.asp. Here's the code:

<%
dim sLName
dim sZip
dim sCon 'ado connection string
dim adoConn 'ado connection
set adoConn = server.createobject("adodb.connection")
sCon ="DRIVER={Microsoft Access Driver
(*.mdb)};DBQ=http:www.rmconnection.com/CurrentShipped.mdb"
adoconn.open scon
sLName = request.form("LastName")
sZip = request.form("Zip")
response.write "My name is " & sLName & chr(11)
response.write "And I live in " & sZip
%>


I've searched for this error message in the Knowledge Base, and the only
article says to make sure that the security settings on your Temp folder
allow other users to write to it. I've done this, and I still keep getting
the error. Are they referring to settings on the server or the client. I
eventually want our customers to be able to load this page, but I don't see
how that can work if every user has to reset the permissions on his temp
folder, something most people aren't likely to know how to do. any one else
have any experience with this problem? Any help would be greatly
appriciated.

Best,

Jim
 
J

Jim Buyens

Try:

sCon = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & _
Server.MapPath("/CurrentShipped.mdb") & ";"

Better yet, put your database in a subfolder named
something like fbdb or db, and make that folder
nonbrowsable. This doesn't interfere with local access,
but it does stop Web visitors from downloading your .mdb
file.

Better yet, also build the connection string in the
global.asa file, and save it as an Application variable.
For example:

<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart
Application("conCurShip") = & _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & _
Server.MapPath("/db/CurrentShipped.mdb") & ";"
End Sub
</SCRIPT>

That way, any page in your application can can open the
database with:

set adoConn = server.createobject("adodb.connection")
adoConn.open Application("conCurShip")

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
-----Original Message-----
I get the following error message


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 0x940 Thread 0xb04
DBC 0x9266f84 Jet'.

/test.asp, line 87

when I try to open test.asp. Here's the code:

<%
dim sLName
dim sZip
dim sCon 'ado connection string
dim adoConn 'ado connection
set adoConn = server.createobject("adodb.connection")
sCon ="DRIVER={Microsoft Access Driver
(*.mdb)};DBQ=http:www.rmconnection.com/CurrentShipped.mdb"
adoconn.open scon
sLName = request.form("LastName")
sZip = request.form("Zip")
response.write "My name is " & sLName & chr(11)
response.write "And I live in " & sZip
%>


I've searched for this error message in the Knowledge Base, and the only
article says to make sure that the security settings on your Temp folder
allow other users to write to it. I've done this, and I still keep getting
the error. Are they referring to settings on the server or the client. I
eventually want our customers to be able to load this page, but I don't see
how that can work if every user has to reset the permissions on his temp
folder, something most people aren't likely to know how to do. any one else
have any experience with this problem? Any help would be greatly
appriciated.

Best,

Jim








.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top