468,544 Members | 1,711 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,544 developers. It's quick & easy.

Cannot update, database or object is read only

Thank you sir,
I have another question....

Recently I got this error.
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.
/Jose/add.asp, line 21

Browser Type:
Opera/9.80 (Windows NT 5.1; U; en) Presto/2.5.22 Version/10.50

Page:
GET /Jose/add.asp
My code is as follows.....
Expand|Select|Wrap|Line Numbers
  1. <%@ Language=VBScript %>
  2. <% Response.Buffer = true %>
  3. <HTML>
  4. <HEAD>
  5. <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
  6. </HEAD>
  7. <BODY>
  8. <%
  9. Dim rs 
  10.  
  11. Set rs = Server.CreateObject ("ADODB.Recordset")
  12. rs.CursorType = 2
  13. rs.LockType = 3
  14. rs.Open "register", "DSN=Registration"
  15.  
  16.  
  17. rs.AddNew 
  18.  
  19. rs("Name") = Request.Form ("name")
  20. rs("Age") = Request.Form ("age")
  21. rs.Update 
  22.  
  23.  
  24. rs.Close 
  25. set rs = nothing
  26. Response.write("Updated")
  27. %>
  28. <P>&nbsp;</P>
  29.  
  30. </BODY>
  31. </HTML>
Mar 12 '10 #1
1 2727
jhardman
3,405 Expert 2GB
I notice you don't specify login credentials, many dbs require a login in order to update, although a public connection can often read data. If it were me, I would create a user for this function, make sure he has access to update the data, and make sure you connect as that user.

Jared
Mar 12 '10 #2

Post your reply

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

Similar topics

reply views Thread by NPC403 | last post: by
1 post views Thread by UniDue | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.