By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,659 Members | 1,714 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,659 IT Pros & Developers. It's quick & easy.

How to fix "operation must be an updateable query" error?

P: 3
Whenever I execute the following ASP code in IIS environment, I get the error as- "operation must be an updateable query"
Following is a simple ASP code for insertion of record retrieved from querystring into database

Expand|Select|Wrap|Line Numbers
  1. <%
  2. dim conn,rs,name,address,sql
  3. set conn=Server.CreateObject("ADODB.Connection")
  4. conn.Provider="Microsoft.Jet.OLEDB.4.0"
  5. conn.Open "c:/webdata/northwind.mdb"
  6. set rs=Server.CreateObject("ADODB.Recordset")
  8. name=Request.QueryString("entry_name")
  9. address=Request.QueryString("entry_address")
  11. sql="INSERT INTO Table(name,address) values('"&name&"','"&address&")"
  12. conn.Execute sql
  13. %>
I get this type of error for the underlined command.
Please anybody specify me a solution.
Jan 7 '11 #1
Share this Question
Share on Google+
4 Replies

Expert Mod 10K+
P: 12,370
Table is a reserved name, and so is Name, did you really name your table table and your field name?
Jan 7 '11 #2

P: 3
I named Table table in which there are two fields viz. name and address
Jan 8 '11 #3

Expert Mod 10K+
P: 12,370
That's probably why then. Either rename them or qualify them.
Jan 8 '11 #4

Expert 2.5K+
P: 3,405
There also appears to be a missing single quote (&apos;) before the last parenthesis
Jan 10 '11 #5

Post your reply

Sign in to post your reply or Sign up for a free account.