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.
The Folder where the database is located have Read/Write/Modify permision to
the users. Also the database itself has the same permission. But still I get
the same error. I don't know what to do anymore...

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

Bob Barrows [MVP]

Sanju said:
I keep getting this error whenever I run my ASP page

You would have been better off posting this to
microsoft.public.inetserver.asp.db, but since I am here ...
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. The Folder where the database is located have
Read/Write/Modify permision to the users. Also the database itself
has the same permission. But still I get the same error. I don't know
what to do anymore...
'declare SQL statement that will query the database
sSQL = "INSERT into tbluserdbase (name, staffno, comments) values ('"
& _ name & "', '" & staffno & "', '" & comments & "')"
<snip>
You say you have given permissions to the users, but do you know who the
users are? Does your site have Anonymous Access enabled? Does it use
Integrated Security?
Start with this article and follow up in the ASP group if it leaves any of
your questions unanswered:
http://www.aspfaq.com/show.asp?id=2062
 
S

Skip

Sanju said:
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.
The Folder where the database is located have Read/Write/Modify permision
to
the users. Also the database itself has the same permission. But still I
get
the same error. I don't know what to do anymore...

I hope somebody can help me in here...

Did you look at http://support.microsoft.com/kb/328828

I have also had luck settng the UniqueRecords property to Yes.
Look at http://support.microsoft.com/kb/240098 for steps, though it is
referring to a delete query.
 

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