Re: OleDbException: Operation must use an updateable query

From: William Ryan eMVP (dotnetguru_at_comcast.nospam.net)
Date: 05/30/04


Date: Sat, 29 May 2004 21:47:22 -0400

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/
"VB Programmer" <RobertNZana*NoSpam-Please*@juno.com> wrote in message
news:OhDm8ReREHA.1160@TK2MSFTNGP09.phx.gbl...
> 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
>
>


Relevant Pages

  • Re: Operation must use an updateable query.
    ... You also need to set the permission via Windows Explorer not just IIS. ... Alphonse Giambrone ... >>> Sub SubmitBtn_Click(ByVal Sender As Object, ByVal E As EventArgs) ... >>> dbParams, Object& executeResult) ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: SQL insert error
    ... The database is simple access xp database. ... >>Operation must use an updateable query. ... > dbParams, Object& executeResult) ... > sourceControl, String eventArgument) ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Cant Open OleDb Connection to Access Database
    ... Looks like a permission issue. ... "David" wrote in message ... > datareader and display the records in a datagrid on a web form (using ... It all works great when the .mdb file is local, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Operation must use an updateable query.
    ... > Sub SubmitBtn_Click(ByVal Sender As Object, ByVal E As EventArgs) ... > Operation must use an updateable query. ... > dbParams, Object& executeResult) ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Operation must use an updateable query.
    ... > Sub SubmitBtn_Click(ByVal Sender As Object, ByVal E As EventArgs) ... > Operation must use an updateable query. ... > dbParams, Object& executeResult) ...
    (microsoft.public.dotnet.framework.aspnet)

Quantcast