Error;ADODB.Recordset (0x800A0CB3)?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gokul G
    New Member
    • Feb 2012
    • 1

    Error;ADODB.Recordset (0x800A0CB3)?

    This is the error that i receive.

    Error Type:
    ADODB.Recordset (0x800A0CB3)
    Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.
    /project/pages/addnew.asp, line 11

    The code is;
    <html>
    <head><title>Di splaying registered guest Table</title>
    <%
    Dim objconn,strconn ,objrs
    set objconn = server.createob ject("ADODB.Con nection")
    strconn="provid er=microsoft.je t.OLEDB.4.0; Data Source="& _
    "c:\inetpub\www root\project\pa ges\Register.md b"
    objconn.open strconn
    set objrs= server.createob ject("ADODB.Rec ordset")
    objrs.open "register", objconn, 3,1
    objrs.addnew
    objrs("ADMNO")= request.form("a dmno")
    objrs("NAME")=r equest.form("na me")
    objrs("DATE FO BIRTH")=request .form("dob")
    objrs("ADDRESS" )=request.form( "add")
    objrs("FEES")=r equest.form("fe es")
    objrs.update
    objrs.close
    %>
    </head>
    <body>
    <table border=1>
    <%
    objrs.open "register",objc onn
    while not objrs.eof %>
    <tr>
    <td> <%=objrs("ADMNO ")%></td>
    <td> <%=objrs("NAME" )%></td>
    <td> <%=objrs("DAT E FO BIRTH")%></td>
    <td> <%=objrs("ADDRE SS")%></td>
    <td> <%=objrs("FEES" )%></td>
    </tr>
    <%
    objrs.movenext
    wend
    objrs.close
    objconn.close
    set objrs=nothing
    set objconn=nothing
    %>
    </table>
    </body>
    </html>
    NOTE:Iam A Begginner in asp please help me.
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    This is an easy one! The default db connection only has the ability to read from the db, not make any changes. In order to make changes you will need to change your db connection. The simplest way to do this (in my opinion) is to add two parameters to the line where you open the connection:
    Code:
    objconn.open strconn 3 4
    it's been a while, and I'm not 100% sure it is supposed to be 3 and 4, you can look them up, they are defined by microsoft as "adopendyna mic" and "adlockoptimist ic". Google search should confirm if I got the numbers right.

    Alternately, there is a text file you can include in your asp page called "adodb.inc" , that has a whole bunch of constants defined, and then you can just say "objconn.co pen strconn adopendynamic adlockoptimisti c"

    Let me know if this helps.

    Jared

    Comment

    Working...