Help: OleDbException: Operation must use an updateable query

V

VB Programmer

I do an UPDATE query in my ASP.NET page. On my development machine it works
PERFECTLY. When I upload the site (inlcuding my Access MDB) to my
production website and try to do the same update qry I get this error. Any
ideas?

System.Data.OleDb.OleDbException: Operation must use an updateable query. at
System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr) at
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS
dbParams, Object& executeResult) at
System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at
System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior,
Object& executeResult) at
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior
behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
at MyPage.EditHtml.cmdSave_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\EarlyAlert2\EditHtml.aspx.vb:line 151
 
W

William Ryan eMVP

If you search for Updateable in the Message, there are a few of these out
there. Anyway, normally this problem is no primary key, but if it works on
the Winforms app but not the web, 99% likelihood it's a permissions issue.
Here's Steve Cheng's Answer

Hi Carlos,

From your description, you encountered the "Operation must use an
updateable query" when try to use OleDbCommand to insert a record into an
access database, yes?

Since you're manipulating it in ASP.NET web application and is on an
Windows server 2003 machine, I think the problem is likely due to security
issue. I think we can perform the following steps first:

1. Test it in a winform application to see whether it works, this can
confirm whether it's specified to the mdb file or the asp.net web
application.

2. In W2K3 server machine(with iis6) ,yes? The default asp.net workproces
is NetWorkService rather than Machine\aspnet, please have a further check
to see whether you've grant the sufficient permission to this workprocess
account .

3. I've met a former issue similiar with this and it resolved by add the
write permission to the mdb file to Everyone group. I think you may also
have a try on this.

If you have any other new findings, please also feel free to post here.
Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

--
W.G. Ryan MVP Windows - Embedded

http://forums.devbuzz.com
http://www.knowdotnet.com/dataaccess.html
http://www.msmvps.com/williamryan/
 

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