How to fix error "ADODB.Recordset (0x800A0CB3) Current Recordset does not . . ."?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rashmi wadhwa
    New Member
    • Jan 2011
    • 1

    How to fix error "ADODB.Recordset (0x800A0CB3) Current Recordset does not . . ."?

    <%

    dim conn,rs

    set conn=Server.cre ateobject("ADOD B.Connection")
    set rs=Server.creat eobject("ADODB. RecordSet")
    conn.Open "Provider=SQLOL EDB;Persist Security Info=False;User Id=sa;Initial Catalog=movie;I nitial File Name=C:\Inetpub \wwwroot\b\movi e.mdf"



    rs.Open "login",con n
    rs.AddNew
    rs("fname")=req uest.form("fnam e")
    rs("lname")=req uest.form("lnam e")
    rs("id")=reques t.form("id")
    rs("password")= request.form("p assword")
    rs("fav")=reque st.form("fav")
    rs("ans")=reque st.form("ans")
    rs.Update
    response.redire ct("msg1.asp")
    rs.Close
    set rs=Nothing
    conn.Close
    set conn=Nothing
    %>
  • stepterr
    New Member
    • Nov 2007
    • 157

    #2
    Have you verified that you have permission to update the database?

    Comment

    • jhardman
      Recognized Expert Specialist
      • Jan 2007
      • 3405

      #3
      Issue is just that the default recordset is read-only (and also only start to end, you can't go back). In the line where you open the rs (rs.open "login", conn) you need to add two arguments:
      Code:
      rs.open "login", conn, adopendynamic, adlockoptimistic
      those two arguments are just constant integers, you might need to look those up (I think they are 3 and 4 respectively), all the ado constants are listed in a file named adodb.inc if I remember right.

      Jared

      Comment

      Working...