Problem connecting to Access Database - "already opened exclusively by another user"

T

Tom Wild

Hi

I am trying to create a webform that connects to an Access database.

If I use the connection string:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Gizmo\Gizmo.mdb"
Then the application connects to the database and downloads data fine but
when I try to fire an Update command I get the following error:
"Problem firing System.Data.OleDb.OleDbCommand - Operation must use an
updateable query"

If I change the connection string to:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Gizmo\Gizmo.mdb;Mode=3"
Then the application will not even connect to the database and I get the
following error:
"The Microsoft Jet database engine cannot open the file
'C:\Gizmo\GizmoVIII.mdb'. It is already opened exclusively by another user,
or you need permission to view its data"

I have already gone into Computer Management and made the IUSR_TOMWILD user
a member of Administrators but I am still getting the above errors.

My questions are as follows:
Am I correct in assuming that adding ";Mode=3" to the connection string is
giving me write access to the database but that I don't have sufficient
permissions to have this access?
How do I get such access for my webform?
I found an article in the Microsoft Knowledge Base which seems to address
this problem http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q316675
Unfortunately it suggests that I either "Configure the ASP.NET worker
process to run under the SYSTEM account in the <processModel> section of the
Machine.config file." or "enable impersonation on your ASP.NET application"
and I don't know how to do either of these. Will either of these solve my
problem and how do I do them?
Other articles suggest that I need to ensure that the database directory and
the database and my temp directory are all set so that IUSR_TOMWILD can
read/write to them. How do I do this?

Sorry for the extra-long question.

Thanks

Tom Wild
 

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

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top