Another question on server/local diffs

M

MikeR

My host doesn't allow parent paths, citing security concerns. I have IIS on my local box,
and set parent paths off to match, so publishing doesn't break the data access pages.

Now, locally, dbname="DBQ=" & Server.MapPath("/db/qsl.mdb") gives me

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 0xdb4 Thread 0x204 DBC 0x1150064 Jet'.

Googling that finds a ton of references to error 80004005, but nothing that fixes the problem.

MikeR 1st
 
K

Kevin Spencer

Hi Mike,

This is due to a permissions issue. To use ODBC, the INETUSER_<amachine
name> local user account under which ASP runs must have permission to read
the given registry key, as System DSNs are stored in the registry. There are
several solutions for this. If you feel that you must use ODBC, you can set
the proper permission for the user account. See the following Microsoft KB
article for details:

http://support.microsoft.com/default.aspx?scid=kb;en-us;306518

In addition, you can use OLEDB rather than ODBC. ODBC is actually a wrapper
for OLEDB, and is slower therefore. You can use an OLEBD Connection String,
which has all of the information that is typically stored in a System DSN
right in the Connection String. For an example, see:

http://www.connectionstrings.com/

Look at the example for a Standard OLEDB Connection String for an Access
database.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Paranoia is just a state of mind.
 
M

MikeR

Hi Kevin -
Thanks for the reply.

I don't understand why, if it's a permission issue, this works (if parent paths are enabled)
dbname="DBQ=" & Server.MapPath("../db/qsl.mdb")
Isn't it reading the same registry key either way?

I'd been on the MS site you referenced, and I still don't see anything that matches my
error message, or resolves the issue. Can you point to a specific one?

The connection is
set conxtemp=server.createobject("adodb.connection")
conxtemp.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath("../db/qsl.mdb")
It works fine as long as using parent path is enabled.

I'm not being argumentative, just striving for enlightment.
Thanks,
Mike
 
S

Stefan B Rusynko

Mike
See http://www.aspfaq.com/show.asp?id=2154 and the KB links there




| Hi Kevin -
| Thanks for the reply.
|
| I don't understand why, if it's a permission issue, this works (if parent paths are enabled)
| dbname="DBQ=" & Server.MapPath("../db/qsl.mdb")
| Isn't it reading the same registry key either way?
|
| I'd been on the MS site you referenced, and I still don't see anything that matches my
| error message, or resolves the issue. Can you point to a specific one?
|
| The connection is
| set conxtemp=server.createobject("adodb.connection")
| conxtemp.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
| Server.MapPath("../db/qsl.mdb")
| It works fine as long as using parent path is enabled.
|
| I'm not being argumentative, just striving for enlightment.
| Thanks,
| Mike
|
| Kevin Spencer wrote:
| > Hi Mike,
| >
| > This is due to a permissions issue. To use ODBC, the INETUSER_<amachine
| > name> local user account under which ASP runs must have permission to read
| > the given registry key, as System DSNs are stored in the registry. There are
| > several solutions for this. If you feel that you must use ODBC, you can set
| > the proper permission for the user account. See the following Microsoft KB
| > article for details:
| >
| > http://support.microsoft.com/default.aspx?scid=kb;en-us;306518
| >
| > In addition, you can use OLEDB rather than ODBC. ODBC is actually a wrapper
| > for OLEDB, and is slower therefore. You can use an OLEBD Connection String,
| > which has all of the information that is typically stored in a System DSN
| > right in the Connection String. For an example, see:
| >
| > http://www.connectionstrings.com/
| >
| > Look at the example for a Standard OLEDB Connection String for an Access
| > database.
| >
 
M

MikeR

Hi Kevin -
Thanks for the reply.

I don't understand why, if it's a permission issue, this works (if parent paths are enabled)
dbname="DBQ=" & Server.MapPath("../db/qsl.mdb")
Isn't it reading the same registry key either way?

I'd been on the MS site you referenced, and I still don't see anything that matches my
error message, or resolves the issue. Can you point to a specific one?

The connection is
set conxtemp=server.createobject("adodb.connection")
conxtemp.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath("../db/qsl.mdb")
It works fine as long as using parent path is enabled.

I'm not being argumentative, just striving for enlightment.
Thanks,
Mike
 
M

MikeR

Hi Stefan -
Thanks for your reply. I'm struggling to understand that this is a permissions issue when
it works perfectly if the connection is:
set conxtemp=server.createobject("adodb.connection")
conxtemp.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath("../db/qsl.mdb")
and parent paths is(are?) enabled.
This is a DSN-less connection.

The advice to stop using ODBC drivers may be valid. MDAC is up-to-date. The database is
not corrupt, and has not been compacted/repaired lately.

These steps on the MS page don't make a lot of sense to me, for the life of me I just
can't find the Security menu.... LOL

1. Start Registry Editor (Regedt32.exe).
2. Select the following key in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC
3. On the Security menu, click Permissions.
4. Type the required permissions for the account that is accessing the Web page.
5. Quit Registry Editor.

Mike
 

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