Results 1 to 7 of 7

Thread: ADO ERROR: Operation must use an updatable query

  1. #1

    Thread Starter
    Addicted Member ShIzO's Avatar
    Join Date
    Apr 1999
    Location
    Bartlett, IL
    Posts
    189

    Arrow Please help me with this ADO problem!

    Hello friends,

    I have a question this ASP runs on ADO 2.1 & 2.5 but it dues not run on ADO 2.0
    When i run it on 2.0 i get the following error:

    Code:
    Microsoft OLE DB Provider for ODBC Drivers error '80004005' 
    
    [Microsoft][ODBC Microsoft Access 97 Driver] Operation must use an updatable query. 
    
    /howyoucanhelp/submit.asp, line 15
    And here is my ASP trouble code :

    Code:
       set objDBConn=Server.CreateObject ("ADODB.Connection")
       objdbconn.Open "Petition"
    
       strSQL = "Insert Into Petition (Name, Address, _
           City, State, Zip, Email) 
           Values ('" & Request.Form("Name") & "', '" & _
           Request.Form("Address") & "', '" & _
           Request.Form("City") & "', '" & _
           Request.Form("State") & "', '" & _
           Request.Form("Zip") & "', '" & _
           Request.Form("Email") & "')"	
       objDBConn.Execute (strSQL)
       objDBConn.close
       set objDBConn = nothing
    Shall i use Recordset to make it work or what?
    Please help. I need to get it running on MDAC 2.0!
    Thanks

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    put brackets around the NAME column:

    "Insert Into Petition (Name, Address, _
    City, State, Zip, Email)


    should be

    "Insert Into Petition ([Name], Address, _
    City, State, Zip, Email)

    also make sure your IUSR_MachineName (on your server) has change permission on the directory that the DB resides in

  3. #3

    Thread Starter
    Addicted Member ShIzO's Avatar
    Join Date
    Apr 1999
    Location
    Bartlett, IL
    Posts
    189

    Wink Thank You!


  4. #4

    Thread Starter
    Addicted Member ShIzO's Avatar
    Join Date
    Apr 1999
    Location
    Bartlett, IL
    Posts
    189

    Red face Still having problem!

    I tried the above and I get the following error now:

    Code:
    Microsoft OLE DB Provider for ODBC Drivers error '80004005' 
    
    [Microsoft][ODBC Microsoft Access 97 Driver] Couldn't lock file. 
    
    /howyoucanhelp/submit.asp, line 10

  5. #5
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    Does the IUSR_MachineName have change access to the Directory that the DB resides in? Just setting the permissions on the MDB file is not enough.

  6. #6

    Thread Starter
    Addicted Member ShIzO's Avatar
    Join Date
    Apr 1999
    Location
    Bartlett, IL
    Posts
    189

    Angry

    Yes it does, i have changed the permissions to read+write for that folder thru NT Explorer.

    Thank you for help.

  7. #7

    Thread Starter
    Addicted Member ShIzO's Avatar
    Join Date
    Apr 1999
    Location
    Bartlett, IL
    Posts
    189

    Talking IT WORKED! Thanks Clunietp


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width