Operation must use an updateable query.

S

Sanju

I keep getting this error whenever I run my ASP page
Error Type:
Microsoft JET Database Engine (0x80004005)
Operation must use an updateable query.
/usergroup/addtodbase.asp, line 37

I've searched about this error in the internet but I can't find the answer.
I hope somebody can help me in here...


<% @ Language="VBScript" %>
<% Option Explicit %>
<html>
<head>
<title>Form to database</title>
</head>
<body>
<%
'declare your variables
Dim name, staffno, comments
Dim sConnString, connection, sSQL



' Receiving values from Form, assign the values entered to variables
name = Request.Form("name")
staffno = Request.Form("staffno")
comments =Request.Form("comments")

'declare SQL statement that will query the database
sSQL = "INSERT into tbluserdbase (name, staffno, comments) values ('" & _
name & "', '" & staffno & "', '" & comments & "')"

'define the connection string, specify database
'driver and the location of database
sConnString= "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source = " & Server.MapPath("userdatabase.mdb")


'create an ADO connection object
Set connection = Server.CreateObject("ADODB.Connection")

'Open the connection to the database
connection.Open(sConnString)

'execute the SQL
connection.execute(sSQL)

response.write "The form information was inserted successfully."

' Done. Close the connection object
connection.Close
Set connection = Nothing
%>
</body>
</html>


Thanks in advance and have a nice day!
 
B

bhicks11 via AccessMonster.com

So I'm assuming you are running an ASP page with an Access backend? Go into
the Access database, and check the query you are getting the error on (the
SQL statement below). Queries that are too complex or based on un-indexed
relations will be non-updateable. I don't know ASP but maybe that will give
you a place to start looking.

Bonnie

http://www.dataplus-svc.com
 
D

Douglas J. Steele

ASP usually runs under the security context IUSR_<nameofcomputer>. Make sure
that ID has the appropriate permissions on the folder where the MDB file
exists: it must have a minimum of Read, Write and eXecute permission on the
folder, or else the locking file (ldb) won't be utilized.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top