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

Current Recordset does not support updating error while submitting form.

P: 7
New to the forum, so thanks for having me.

I'm submitting a form, and attempting to save it to a local copy of an ACCESS 2007 database. When I am submitting the form, I get the following error:

ADODB.Recordset (0x800A0CB3)
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.
/JustBorn/form_submit.asp, line 414

Line 414 is: rs.Open "customer",myconn,adOpenStatic,adLockOptimisti c

been pouring over this for a while now, and finally breaking down and asking. The DB and form_submit.asp are in the same directory on an IIS server, held locally, but will be posted eventually. Any and all help would be appreciated.

Anthony
Beginner Programmer
Expand|Select|Wrap|Line Numbers
  1. <% 
  2.  
  3. DIM repID, cusName, cusPhone, cusAddress, cusCity, cusState, cusZip, product, upccode, mfgcode, bestByDate, purchased, store, notes, contacted, spokewith
  4.  
  5. repID = request.form("repID") 
  6. cusPhone = request.form("cusPhone") 
  7. cusAddress = request.form("cusAddress") 
  8. cusCity = request.form("cusCity") 
  9. cusState = request.form("cusState") 
  10. cusZip = request.form("cusZip") 
  11. product = request.form("product") 
  12. upccode = request.form("upccode") 
  13. mfgcode = request.form("mfgcode") 
  14. bestByDate = request.form("bestByDate") 
  15. purchased = request.form("purchased") 
  16. store = request.form("store") 
  17. notes = request.form("notes") 
  18. contacted = request.form("contacted") 
  19. spokewith = request.form("spokewith") 
  20.  
  21. DIM myconn, RS, curDate, dbPath, dbName
  22. curDate = Date
  23. dbName = "JustBorn.accdb"
  24. dbPath = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Server.MapPath(dbName) & ";Persist Security Info=False;"
  25.  
  26.  
  27. Set myconn = CreateObject("ADODB.Connection")
  28. Set rs = CreateObject("ADODB.Recordset")
  29. myconn.Open = dbPath
  30.  
  31.         rs.Open "customer",myconn,adOpenStatic,adLockOptimistic
  32.  
  33.         rs.AddNew
  34.  
  35.         rs("CurDate") = curDate
  36.         rs("RepID") = repID
  37.         rs("CusName") = cusName
  38.         rs("CusPhone") = cusPhone
  39.         rs("CusAddress") = cusAddress
  40.         rs("CusCity") = cusCity
  41.         rs("CusState") = cusState
  42.         rs("CusZip") = cusZip
  43.         rs("Product") = product
  44.         rs("UPCCode") = upccode
  45.         rs("MFGCode") = mfgcode
  46.         rs("BestByDate") = bestByDate
  47.         rs("Purchased") = purchased
  48.         rs("Store") = store
  49.         rs("Notes") = notes
  50.         rs("Contacted") = contacted
  51.         rs("spokewith") = spokewith
  52.  
  53.         rs.Update
  54.  
  55. 'grab the ID value
  56. DIM ID
  57. ID = RS(0)
  58.  
  59. %>
  60.  
  61. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  62.  
  63. <html>
  64. <head>
  65.     <title>Just Born</title>
  66. </head>
  67.  
  68. <body>
  69.  
  70. <p align="center">
  71. <table align="center" cellpadding="5" border="3" bordercolordark="#707070" bordercolorlight="#E0E3DC">
  72.     <tr>
  73.         <td align="center" valign="middle">
  74.             SAVE CONFIRMED
  75.         </td>
  76.     <tr>
  77.         <td align="center" valign="middle" bgcolor="#E6EFF7">
  78.             <p style="font-family:sans-serif;">
  79.             Record <%=ID%> Saved<br>
  80.             <input type="Button" value="CONTINUE" onClick="window.location='<%=ReturnTo%>'">
  81.             </p>
  82.         </td>
  83.     </tr>
  84. </table>
  85.  
  86. <!--#include file="footer.asp"-->
  87. </p>
  88.  
  89. </body>
  90. </html>
  91.  
  92. <%
  93. 'cleanup
  94. rs.Close
  95. set rs=nothing
  96. myconn.close
  97. set myconn=nothing
  98. %>
Mar 1 '10 #1
Share this Question
Share on Google+
3 Replies


jhardman
Expert 2.5K+
P: 3,405
Try adOpenDynamic rather than adOpenStatic. According to the documentation (as far as I can tell) either should work, but the last time I got this error, I changed cursor type and it worked. Let me know if this helps.

JAred
Mar 2 '10 #2

P: 7
I've tried all of them (except the readony one), and still the same error message
Mar 2 '10 #3

jhardman
Expert 2.5K+
P: 3,405
then the issue might be that you don't have permission. I notice you are not passing login credentials. What kind of db are you using? most have a connection string you can use to pass login info.

Jared
Mar 2 '10 #4

Post your reply

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