Access and database connection

C

chris

I get the following error when I try to run my web page in
asp.net.

The Microsoft Jet database engine cannot open the
file 'c:\inetpub\wwwroot\test\test.mdb'. It is already
opened exclusively by another user, or you need permission
to view its data.

I have gone to the User Accounts and changed all users to
group Administrators, but still does not work. I am using
visual studio.net, and I seem to remember changing
permissions on a file and it seemed to work after that but
can not remember what or where that file is located. If
anyone can help me with this error I would be most
appreciative.

chris
 
N

Naveen K Kohli

Check if there is an instance of Access that has opened this data file and
is still open.
 
J

Jos

chris said:
I get the following error when I try to run my web page in
asp.net.

The Microsoft Jet database engine cannot open the
file 'c:\inetpub\wwwroot\test\test.mdb'. It is already
opened exclusively by another user, or you need permission
to view its data.

I have gone to the User Accounts and changed all users to
group Administrators, but still does not work. I am using
visual studio.net, and I seem to remember changing
permissions on a file and it seemed to work after that but
can not remember what or where that file is located. If
anyone can help me with this error I would be most
appreciative.

chris

This problem can have 2 causes (as indicated by the message):

1) opened by another user. This can be caused by your own
application opening the database and not closing it. Make
sure to add the line myConnection.Close() after opening a
connection. Also use exception handling, so that the
this line also executes in the case of an error.

2) you need permission. Try changing the security settings on
the database file test.mdb, by giving the ASPNET account
at least read access.
 
D

devex

I am having the same problem. My Access database is on my development
machine in the same virtual directory as my Web application. When I
right-click the file there is no security tab for setting permissions.

Does anyone know how to correct this problem?
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top