471,082 Members | 1,008 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,082 software developers and data experts.

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;
<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("DATE FO BIRTH")=request.form("dob")
<table border=1>
objrs.open "register",objconn
while not objrs.eof %>
<td> <%=objrs("ADMNO")%></td>
<td> <%=objrs("NAME")%></td>
<td> <%=objrs("DATE FO BIRTH")%></td>
<td> <%=objrs("ADDRESS")%></td>
<td> <%=objrs("FEES")%></td>
set objrs=nothing
set objconn=nothing
NOTE:Iam A Begginner in asp please help me.
Feb 12 '12 #1
1 4026
3,406 Expert 2GB
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.

Feb 12 '12 #2

Post your reply

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

Similar topics

reply views Thread by Dot Netizen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.