By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,921 Members | 1,442 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,921 IT Pros & Developers. It's quick & easy.

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

P: n/a
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...;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


Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Make sure the Access file is not ReadOnly.

KS
http://www.nAlliance.com

"Tom Wild" <tw***@lightknights.com> wrote in message
news:eF**************@TK2MSFTNGP09.phx.gbl...
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...;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

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.