|
 |
asp_databases thread: asp Error on rsadd.update
Message #1 by "Maelaian" <maelaian@s...> on Fri, 21 Sep 2001 19:15:59 -0700
|
|
Do you know whats wrong with this code
I Get a Error on rsadd.update ... any ideas why
conn.Open dsn, user, pass
Set rsadd = server.CreateObject("ADODB.Recordset")
rsadd.CursorType = 1
rsadd.LockType = 2
rsadd.Open "Users", conn, , , 2
rsadd.addnew
rsadd("UserName") = Request.Form("txtUserName")
rsadd("UserPass") = Request.Form("txtpassword")
rsadd("UserMail") = Request.Form("txtemail")
rsadd.Update
Set rsadd = nothing
Set conn = nothing
Message #2 by David Cameron <dcameron@i...> on Mon, 24 Sep 2001 09:43:43 +1000
|
|
I assume that you mean what is causing the error. In that case what is the
error message?
Other things wrong with your code that may not generate errors:
1. Don't spread it out so much, makes it hard to read.
2. Include adovbs.inc and use the constants instead of the numbers. Makes
your code easier to read.
3. Use a SQL INSERT statement rather than .addnew.
4. Close your connection before you set it to nothing.
regards
David Cameron
nOw.b2b
dcameron@i...
-----Original Message-----
From: Maelaian [mailto:maelaian@s...]
Sent: Saturday, 22 September 2001 12:16 PM
To: ASP Databases
Subject: [asp_databases] asp Error on rsadd.update
Do you know whats wrong with this code
I Get a Error on rsadd.update ... any ideas why
conn.Open dsn, user, pass
Set rsadd = server.CreateObject("ADODB.Recordset")
rsadd.CursorType = 1
rsadd.LockType = 2
rsadd.Open "Users", conn, , , 2
rsadd.addnew
rsadd("UserName") = Request.Form("txtUserName")
rsadd("UserPass") = Request.Form("txtpassword")
rsadd("UserMail") = Request.Form("txtemail")
rsadd.Update
Set rsadd = nothing
Set conn = nothing
Message #3 by "Ken Schaefer" <ken@a...> on Mon, 24 Sep 2001 16:33:05 +1000
|
|
And what is the error?
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Maelaian" <maelaian@s...>
Subject: [asp_databases] asp Error on rsadd.update
: Do you know whats wrong with this code
:
: I Get a Error on rsadd.update ... any ideas why
:
: conn.Open dsn, user, pass
:
: Set rsadd = server.CreateObject("ADODB.Recordset")
:
:
:
: rsadd.CursorType = 1
:
: rsadd.LockType = 2
:
: rsadd.Open "Users", conn, , , 2
:
: rsadd.addnew
:
: rsadd("UserName") = Request.Form("txtUserName")
:
: rsadd("UserPass") = Request.Form("txtpassword")
:
: rsadd("UserMail") = Request.Form("txtemail")
:
: rsadd.Update
:
: Set rsadd = nothing
:
: Set conn = nothing
:
:
:
:
$subst('Email.Unsub')
|
|
 |