Operation must use an updateable query

D

dancer

Using Asp.net 1.1

Trying to learn updating an Access database. Copied code straight from an
example. Received this error:

Operation must use an updateable query

The line in question was this:
DBCommand.ExecuteNonQuery()

I looked here: http://imar.spaanjaars.com/QuickDocId.aspx?QUICKDOC=287

I gave full permissions on the Inet WWWRoot folder and on the mdb file.
Still same error.

The site above recommends modifying the Web.config file by adding <identity
impersonate="true">, but I don't know which config file to modify. I have
zillions on my computer.
Can somebody tell me which?

Or does somebody have an other solution?
 
G

Guest

Using Asp.net 1.1

Trying to learn updating an Access database. Copied code straight from an
example. Received this error:

Operation must use an updateable query

The line in question was this:
DBCommand.ExecuteNonQuery()

I looked here:http://imar.spaanjaars.com/QuickDocId.aspx?QUICKDOC=287

I gave full permissions on the Inet WWWRoot folder and on the mdb file.
Still same error.

The site above recommends modifying the Web.config file by adding <identity
impersonate="true">, but I don't know which config file to modify. I have
zillions on my computer.
Can somebody tell me which?

Or does somebody have an other solution?

Provide modify rights for the folder that contains the database (.mdb)
file to the user account under which ASP.NET is running (usually,
MACHINENAME\ASPNET) and ensure that sql query is working directly from
Access IDE
 
D

dancer

1. Where do I find the name of the user account under which ASP.NET is
running?
2. What do you mean by "Access IDE"?

Thank you.
 
G

Guest

1. Where do I find the name of the user account under which ASP.NET is
running?
2. What do you mean by "Access IDE"?

Hi, if <identity impersonate="false"> ASP.NET runs under default local
account named the ASPNET. You can change this account by configuring
the <processModel> element in the C:\WINDOWS\Microsoft.NET\Framework
\v2.0.50727\CONFIG\machine.config file. If impersonation is enabled
(impersonate="true"), ASP.NET executes with the user identity. So, I
think that you should give to the ASPNet account the modify
permissions to the folder that contains the database file. Moreover,
it could be that the query is wrong and it can be checked in the MS
Access. START - Run - msaccess.exe
 

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,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top