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

Error;ADODB.Recordset (0x800A0CB3)?

P: 1
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>Displaying registered guest Table</title>
<%
Dim objconn,strconn,objrs
set objconn = server.createobject("ADODB.Connection")
strconn="provider=microsoft.jet.OLEDB.4.0; Data Source="& _
"c:\inetpub\wwwroot\project\pages\Register.mdb "
objconn.open strconn
set objrs= server.createobject("ADODB.Recordset")
objrs.open "register", objconn, 3,1
objrs.addnew
objrs("ADMNO")=request.form("admno")
objrs("NAME")=request.form("name")
objrs("DATE FO BIRTH")=request.form("dob")
objrs("ADDRESS")=request.form("add")
objrs("FEES")=request.form("fees")
objrs.update
objrs.close
%>
</head>
<body>
<table border=1>
<%
objrs.open "register",objconn
while not objrs.eof %>
<tr>
<td> <%=objrs("ADMNO")%></td>
<td> <%=objrs("NAME")%></td>
<td> <%=objrs("DATE FO BIRTH")%></td>
<td> <%=objrs("ADDRESS")%></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.
Feb 12 '12 #1
Share this Question
Share on Google+
1 Reply


jhardman
Expert 2.5K+
P: 3,405
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:
Expand|Select|Wrap|Line Numbers
  1. 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 "adopendynamic" and "adlockoptimistic". 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.copen strconn adopendynamic adlockoptimistic"

Let me know if this helps.

Jared
Feb 12 '12 #2

Post your reply

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