FIX: Operation must use an updateable query - error when using Access db

Last post 10-11-2008 6:19 AM by Mikesdotnetting. 77 replies.

Sort Posts:

  • FIX: Operation must use an updateable query - error when using Access db

    02-23-2003, 2:36 AM
    Locked
    • Loading...
    • joteke
    • Joined on 06-16-2002, 3:24 PM
    • Kyro, Finland
    • Posts 6,662
    • ASPInsiders
      Moderator
      TrustedFriends-MVPs

    See this thread: http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=141946

    EDIT:
    -----------------------------
    27th of December 2004
    See also this KB article: PRB: Cannot connect to Access database from ASP.NET
    http://support.microsoft.com/kb/q316675/

    If using Windows Server 2003 (IIS 6), note this:
    http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=209050
    -----------------------------

    Thanks,

    Teemu Keiski
    Finland, EU
  • Re: FIX: Operation must use an updateable query error when using Access db

    03-04-2003, 7:47 PM
    • Loading...
    • torvix2000
    • Joined on 12-17-2002, 7:14 PM
    • Posts 30
    When I don't want to mess with permissions, I simply transfer the site on a FAT partition.

    Otherwise, you'd have to do what the others have suggested.

  • Re: FIX: Operation must use an updateable query error when using Access db

    03-05-2003, 11:00 AM
    • Loading...
    • joteke
    • Joined on 06-16-2002, 3:24 PM
    • Kyro, Finland
    • Posts 6,662
    • ASPInsiders
      Moderator
      TrustedFriends-MVPs
    Yeah well thanks, although I didn't ask for advice. :)
    Thanks,

    Teemu Keiski
    Finland, EU
  • Re: FIX: Operation must use an updateable query error when using Access db

    04-22-2003, 5:39 PM
    • Loading...
    • Daniel P.
    • Joined on 08-11-2002, 2:10 PM
    • Trier, Germany
    • Posts 57
    Yay! That works perfectly - thank you! Three days of hard and endless work and now it finally works!
    Regards,

    Daniel P.
  • Re: FIX: Operation must use an updateable query error when using Access db

    05-04-2003, 11:25 AM
    • Loading...
    • joteke
    • Joined on 06-16-2002, 3:24 PM
    • Kyro, Finland
    • Posts 6,662
    • ASPInsiders
      Moderator
      TrustedFriends-MVPs
    If using Windows Server 2003 (IIS 6), note this:
    http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=209050
    Thanks,

    Teemu Keiski
    Finland, EU
  • Re: FIX: Operation must use an updateable query error when using Access db

    06-06-2003, 12:22 PM
    • Loading...
    • Henrix
    • Joined on 06-06-2003, 12:05 PM
    • Posts 11
    Dear Mr. Keiski
    I do not understand why I still keep getting this error although I made all the changes with permissions.

    My SQL query is below
    Query = "insert into PlayerInfo (Name,Email,CharacterName) values ('" & NameBox.Text '," & MailBox.text & "','" & CNameBax.text & "')"
    and error naturally...Operation must use an updateable query
    What could be wrong???
    I have tried with brackets ([]).
    Thank You in advance.

    Henrix
  • Re: FIX: Operation must use an updateable query error when using Access db

    06-06-2003, 1:59 PM
    • Loading...
    • joteke
    • Joined on 06-16-2002, 3:24 PM
    • Kyro, Finland
    • Posts 6,662
    • ASPInsiders
      Moderator
      TrustedFriends-MVPs
    Hi,

    the error is not in the query. It definitely is in the permissions. Can you describe how the permissions are set for the Access database and folder that contains the db?
    Thanks,

    Teemu Keiski
    Finland, EU
  • Re: FIX: Operation must use an updateable query error when using Access db

    06-07-2003, 8:32 PM
    • Loading...
    • Henrix
    • Joined on 06-06-2003, 12:05 PM
    • Posts 11
    I have given all possible permissions to all root catalogs and to my user account to this database and still...What is this application pool mentioned before in this forum?
    By the way, I am a finn too, not as clever as you it seems to me...
  • Re: FIX: Operation must use an updateable query error when using Access db

    06-07-2003, 8:51 PM
    • Loading...
    • augustwind
    • Joined on 07-21-2002, 11:16 PM
    • Garland, TX
    • Posts 4,124
    • ASPInsiders
      Moderator
      TrustedFriends-MVPs
    You say 'user account' - - - what are you calling the 'user account'?

    The only way it will work is to give the ASPNet Account the correct permissions to the FOLDER - - not the database
    David Wier
    MVP/MCP/ASPInsider
    ASPNet101.com - where to look first!
    iWrite Pro - doc/rtft to HTML/One Click PDF & much more
  • Re: FIX: Operation must use an updateable query error when using Access db

    06-08-2003, 6:03 AM
    • Loading...
    • Henrix
    • Joined on 06-06-2003, 12:05 PM
    • Posts 11
    Well I gave full control to the ASPNet user which is me as an administrator of this computer. In IIS settings I permitted all functions for the virtual directory where my site is located.
    Still without success. This situation starts to irritate me as I managed to make it work with PHP and Apache but no way couldn't do it with ASPNet and IIS. Somebody mentioned something about an application pool or something. What is that?
  • Re: FIX: Operation must use an updateable query error when using Access db

    06-08-2003, 7:30 AM
    • Loading...
    • Henrix
    • Joined on 06-06-2003, 12:05 PM
    • Posts 11
    Everything works now. Thank you guys.
  • Re: FIX: Operation must use an updateable query error when using Access db

    06-24-2003, 1:12 PM
    • Loading...
    • Bachino
    • Joined on 04-13-2003, 4:45 PM
    • Milton Keynes, UK
    • Posts 14
    Hi

    I cannot seem to get this to work, I've checked through and as far as I can tell I've done everything I should have. I'm using Win XP Pro with NTFS by the way..

    The permissions have been set on the folder that contains the databases so that the ASPNET user account can have full control and confirmed that the change permission is set..

    The table is just a simple user table with basic fields. The ID and Username fields are both unique but the ID field is an autonumber.

    All I am doing is trying to create a new user account and I get "Syntax error in INSERT INTO statement". I've checked the Insertable command and this is what it is:

    INSERT INTO secUsers( UserName , GroupID , Password , DisplayName , FirstName , Surname , Email , Website ) VALUES ( ? , ? , ? , ? , ? , ? , ? , ? )

    Here's a bit of the code:
    Dim Connect As OleDbConnection = New OleDbConnection()
    
    Dim Adapter As OleDbDataAdapter = New OleDbDataAdapter()
    Dim UserCB As OleDbCommandBuilder
    Dim UserDS As DataSet = New DataSet()
    Dim strSelect As String
    Dim Row As DataRow
    Const conTable As String = "Users"

    Private Sub btnApply_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnApply.Click
    If Me.txtPassword.Text = Me.txtPassword2.Text Then
    GetUser(0)
    Row = UserDS.Tables(conTable).NewRow
    Row.BeginEdit()
    Row.Item("GroupID") = 0
    Row.Item("UserName") = Me.txtUserName.Text
    Row.Item("Password") = Me.txtPassword.Text
    Row.Item("DisplayName") = Me.txtDisplayName.Text
    Row.Item("FirstName") = Me.txtFirstName.Text
    Row.Item("Surname") = Me.txtSurname.Text
    Row.Item("Email") = Me.txtEmail.Text
    Row.Item("Website") = Me.txtWebsite.Text

    UserDS.Tables(conTable).Rows.Add(Row)

    Adapter.Update(UserDS, conTable)

    If UserDS.HasErrors Then
    Info.Text = "Error: " & UserDS.Tables(conTable).Rows(0).RowError
    Else
    Info.Text = "Nice one!"
    End If
    'Info.Text = UserCB.GetInsertCommand.CommandText

    Server.MapPath(Nothing)
    End If
    End Sub

    Private Sub GetUser(ByVal UserID As Integer)
    strSelect = "SELECT * FROM secUsers WHERE ID=" & UserID
    Connect.ConnectionString = ConnectionStr
    Adapter.SelectCommand = New OleDbCommand(strSelect, Connect)
    UserCB = New OleDbCommandBuilder(Adapter)
    UserCB.GetInsertCommand()
    Adapter.Fill(UserDS, conTable)
    End Sub

    Is there anything wrong with the code? The connection string is very basic, I'm using Jet 4.0 with Share Mode Deny None.

    I can read from the database, so the connection is otherwise OK.

    Please, please, please can you help as this has gone beyond a joke and I'm loosing hair..

    Thanks!
  • Re: FIX: Operation must use an updateable query error when using Access db

    06-26-2003, 3:14 PM
    • Loading...
    • joteke
    • Joined on 06-16-2002, 3:24 PM
    • Kyro, Finland
    • Posts 6,662
    • ASPInsiders
      Moderator
      TrustedFriends-MVPs
    Not sure (can't remember exactly) but I have a feeling that Password is a reserved word in Access. try putting it like [Password] in the SQL statement.
    Thanks,

    Teemu Keiski
    Finland, EU
  • Re: FIX: Operation must use an updateable query error when using Access db

    06-27-2003, 7:45 AM
    • Loading...
    • Bachino
    • Joined on 04-13-2003, 4:45 PM
    • Milton Keynes, UK
    • Posts 14
    Thanks you are right, it now works OK!! Thank you very much!!!!
  • FIX: Operation must use an updateable query error when using Access db

    07-04-2003, 2:02 AM
    • Loading...
    • bracoute
    • Joined on 06-13-2003, 3:05 AM
    • Posts 153
    Hello there,

    i'm having the EXACT SAME PROBLEM and the exact same frustration as mr Hendrix..... How did you solve this problem.... I've spent hours looking for what is wrong... can someone plz tell me what must be done exactly for the "Operation must be an Updateable Query" message to disappear forever.... plzzzz cause everyone solving the prob... just say thanks and go but doesn't say what he's done....


    Anybody help
    Thanks in advance
    bracoute


Page 1 of 6 (78 items) 1 2 3 4 5 Next > ... Last ยป