PDA

Click to See Complete Forum and Search --> : ADO ERROR: Operation must use an updatable query


ShIzO
Jul 19th, 2000, 02:03 PM
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:


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 :


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

Clunietp
Jul 19th, 2000, 11:35 PM
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

ShIzO
Jul 20th, 2000, 08:50 AM

ShIzO
Jul 20th, 2000, 09:59 AM
I tried the above and I get the following error now:


Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access 97 Driver] Couldn't lock file.

/howyoucanhelp/submit.asp, line 10

Clunietp
Jul 20th, 2000, 10:01 AM
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.

ShIzO
Jul 20th, 2000, 10:08 AM
Yes it does, i have changed the permissions to read+write for that folder thru NT Explorer.

Thank you for help.

ShIzO
Jul 20th, 2000, 10:45 AM