Cannot connect to Access 2000 database from ASP.Net app

G

Guest

When attempting to connect to an Access 2000 DB using ADO.Net from within
ASP.Net running under an impersonated local user account receiving the
following error.

ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Disk or network
error. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
SQLSetConnectAttr failed ERROR [HY000] [Microsoft][ODBC Microsoft Access
Driver] Disk or network error

Oracle ODBC connection works fine under the same user so assuming this is
something to do with either Access specific registry permissions, or NTFS
file permissions. Assuming ODBC call is being made using impersonated user
account?

Anybody ever come across this problem before
 
C

Cor Ligthert

StueyH,

Oracle is a database server. Access is a database in a file. You have to set
the proper security properties on file level for that database.

I hope this helps,

Cor
 
G

Guest

Managed to find my own solution which may be of use to others.

Checked the system temp directory and this had the required permissions.
Then checked for any other profiles that may also contain a temp directory
that may be effecting this.

Discovered the C:\Documents and Settings\[MachineName]\ASPNET\Temp folder
for the ASPNET user profile. Added full permissions to the directory for the
impersonation user and this is now working fine. I have reversed the
registry changes I made to the SOFTWARE\ODBC key and still working Ok.
 
M

Miha Markic [MVP C#]

Hi,

Obvisouly your problem was running asp.net application and not accessing to
database (it was a consequence)...
 

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