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

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

P: 1
<%

dim conn,rs

set conn=Server.createobject("ADODB.Connection")
set rs=Server.createobject("ADODB.RecordSet")
conn.Open "Provider=SQLOLEDB;Persist Security Info=False;User Id=sa;Initial Catalog=movie;Initial File Name=C:\Inetpub\wwwroot\b\movie.mdf"



rs.Open "login",conn
rs.AddNew
rs("fname")=request.form("fname")
rs("lname")=request.form("lname")
rs("id")=request.form("id")
rs("password")=request.form("password")
rs("fav")=request.form("fav")
rs("ans")=request.form("ans")
rs.Update
response.redirect("msg1.asp")
rs.Close
set rs=Nothing
conn.Close
set conn=Nothing
%>
Jan 23 '11 #1
Share this Question
Share on Google+
2 Replies


stepterr
100+
P: 157
Have you verified that you have permission to update the database?
Jan 24 '11 #2

jhardman
Expert 2.5K+
P: 3,405
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:
Expand|Select|Wrap|Line Numbers
  1. 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
Jan 24 '11 #3

Post your reply

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