Cannot use AddNew

Results 1 to 2 of 2

Thread: Cannot use AddNew

  1. #1
    Join Date
    Dec 1969

    Default Cannot use AddNew

    I have problems using [recordset.addnew]. The connection is OK, and the recordset is OK. When it comes to the line using addnew method, it is stuck. My asp script is as follows:<BR>&#060;%<BR><BR>dim userid, pw<BR>dim conn1, rs1<BR><BR>userid=request.form("userid")<BR>pw=req uest.form("pw")<BR><BR>if userid="" or pw="" then<BR>response.redirect ""<BR>end if<BR><BR>set conn1=server.createobject("adodb.connection")<BR>c "test"<BR><BR>set rs1=server.createobject("adodb.recordset")<BR>rs1. open "select * from user", conn1<BR><BR>set session("rs1")=rs1<BR><BR>rs1.AddNew<BR>rs1("useri d")=userid<BR>rs1("pw")=pw<BR>rs1.update<BR> ose<BR>conn1.close<BR>response.redirect ""<BR><BR>%&#062;

  2. #2
    Join Date
    Dec 1969

    Default RE: Cannot use AddNew

    try using cursor types in your connection:<BR>==<BR>set rs1=server.createobject("adodb.recordset")<BR>rs1. open "select * from user", conn1, adOpenForwardOnly, adLockReadOnly<BR>==<BR>where &#039conn1&#039 is my connection string. remeber to include, it&#039s a file that has all the settings for the cursor types. search for it on this site and you should find it. let me know if that worked.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts