« Previous Next »

Thread: The dreaded "Operation must use an updateable query" on IIS7/Vista

Last post 12-01-2008 7:00 AM by skillsy. 3 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (4 items)

Sort Posts:

  • 11-29-2008, 12:27 AM

    • skillsy
    • Not Ranked
    • Joined on 11-28-2008, 11:53 PM
    • Posts 3

    The dreaded "Operation must use an updateable query" on IIS7/Vista

    Hi all,

       I have spent the last two days pulling what is left of my hair out with this conumdrum. I am attempting to test on a new Vista IIS7 on localhost an update of an access 2003 db by a test user. This all worked on my xp 2000 laptop that has been put out to pasture.

     I enabled IIS and set-up anODBC (standardMS Access driver) connection to the database. The first page of the suite reads in the dropdown list of countries from a table stored in the database so I know that it can both find and read the database.

     The error comes when attempting to register  a user in a table with a test of the code below...

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <%@LANGUAGE="VBSCRIPT"%>
    <!--#include file="Connections/AACdb.asp" -->

    <%
    Dim conn,rsRider
    Set conn = Server.CreateObject("ADODB.Connection")
    Conn.Open MM_AACdb_STRING

    Set rsRider = Server.CreateObject("ADODB.Recordset")
    rsRider.ActiveConnection     = Conn
    rsRider.CursorLocation         = 3' adUseClient
    rsRider.CursorType             = 3 'adOpenStatic instead of adOpenKeyset
    rsRider.LockType             = 3 'adLockOptimistic
    rsRider.Source                 = "tblRider"
    rsRider.Open


    '-------------------------------
    '---- Create New Rider ----
    '-------------------------------
    rsRider.Addnew
    rsRider("lngRiderMasterID")                        = null
    rsRider("lngDistanceId")                        = 1
    rsRider("bytSiteId")                            = 0
    rsRider("bytStateID")                            = 3
    rsRider("txtCountryID")                            = "AU"
    rsRider("bytRiderStatus")                        = 10 ' Rider Details Lodged - no payment details
    rsRider.update
    lngRiderId = rsRider("lngRiderID")
    rsRider.Close           
    set rsRider = nothing
    set conn = nothing
    %>
    <html>
    <head>
    <!--METADATA TYPE="typelib" uuid="00000205-0000-0010-8000-00AA006D2EA4" -->
    </head>
    <body>
    Done: <%=lngRiderId%>
    </body></html> 

     

    Microsoft OLE DB Provider for ODBC Drivers error '80004005'

    [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.

    /ssl/register/yTest.asp, line 29


    I have performed the following from this thread...

    http://blogs.iis.net/bills/archive/2007/05/21/tips-for-classic-asp-developers-on-iis7.aspx

    which was to run theses commands as administrator...

    %windir%\system32\inetsrv\appcmd set config /section:applicationPools /[name='DefaultAppPool'].processModel.loadUserProfile:false

    icacls %windir%\serviceprofiles\networkservice\AppData\Local\Temp /grant Users:(CI)(S,WD,AD,X)

    icacls %windir%\serviceprofiles\networkservice\AppData\Local\Temp /grant "CREATOR OWNER":(OI)(CI)(IO)(F)

     I also used Process Monitor to locate any issues but apart from the odd Fast IO denial, all appears above board.

     So now I admit I have been beaten by the machine and have even less hair. All the security looks fine so where do I turn to????

    TIA

    Skillsy

     

  • 11-29-2008, 10:59 AM In reply to

    Re: The dreaded "Operation must use an updateable query" on IIS7/Vista

    Maybe try this ?

    http://databases.aspfaq.com/database/how-do-i-solve-operation-must-use-an-updateable-query-errors.html

    Regards,
     

    Paul Lynch | www.iisadmin.co.uk
  • 11-30-2008, 6:17 AM In reply to

    • skillsy
    • Not Ranked
    • Joined on 11-28-2008, 11:53 PM
    • Posts 3

    Re: The dreaded "Operation must use an updateable query" on IIS7/Vista

    Paul,

       Thanks for the link , I will go through the group security and see if I get a result.

        

  • 12-01-2008, 7:00 AM In reply to

    • skillsy
    • Not Ranked
    • Joined on 11-28-2008, 11:53 PM
    • Posts 3

    Re: The dreaded "Operation must use an updateable query" on IIS7/Vista

    Woo hoo - Fixed! now to patch that rather largish security hole!

     I read through all the links in the post above but the only thing I hadn't done was set the conn.mode = 3 (adModeReadWrite) which didn't fix the issue.

    I went to my friend Google and found http://faq.matchware.com/en/?q=90 which states that you should add "everyone" to your db directory with  full control and hey presto it worked (no need to recycle IIS either).

    This leaves me in a quandary of what to add to the security so I can remove "everyone"?

    I currently have the following security

    • Everyone - Full Control
    • Creator / Owner - Nothing set
    • System - Full control (All greyed out)
    • Skillsy (Skillsy-PC\Skillsy) - Full Control
    • Users (Skillsy-PC\Users) - Just Read & Execute,List,Read (all greyed out)
    • IIS_IUSRS (Skillsy-PC\IIS_IUSRS)  Full Control
    • TrustedInstaller - Full control (All greyed out)

    Can someone explain what I am missing for the best security fix please?

     Skillsy

Page 1 of 1 (4 items)
Microsoft Communities