Hi,
You get this error because u have your connection object "Conn" is missing.
I through your code and found that the statement above the line no 22 will give
this error because that statement open the recordset and use the connection
object that is not define anywhere in this code.
Regards
KK
mark chestnut <[EMAIL PROTECTED]> wrote:
Ok,
I get this error (db is Access):
error '80020009'
/wholesale/o12register.asp, line 22
*************************************
<%
If request("Page") = "2" Then
SQL = "SELECT * FROM Users WHERE Username='" &
request("Username") & "'"
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open SQL, Conn, 1, 3
If NOT (RS.BOF AND RS.EOF) Then
Response.redirect "o12register.asp?Username=" &
request("Username") & "&Name=" & request("Name") &
"&Email=" & request("Email") &
"&Error=Username&AreaID=" & request("AreaID")
End If
RS.Close
Set RS = Nothing
SQL = "SELECT * FROM Areas WHERE AreaID=" &
request("AreaID")
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open SQL, Conn, 1, 3
22. If NOT RS("AllowRegister") Then
Response.redirect "o12register.asp?Username=" &
request("Username") & "&Name=" & request("Name") &
"&Email=" & request("Email") &
"&Error=AllowRegister&AreaID=" & request("AreaID")
End If
ApprovalRequired = RS("ApprovalRequired")
LoginUrl = RS("LoginUrl")
If RS("NotifyWhenRegister") Then
varTo = RSBODY("FromEmail")
varFrom = RSBODY("FromEmail")
varEmailComp = RSBODY("EmailComp")
varSMTPServer = RSBODY("SMTPServer")
varPasswordEmailSubject = "A new user has
registered."
varBody = "A new user has registered for access to
your protected area."
Call sendMail(varTo, varFrom, varEmailComp,
varSMTPServer, varBody, varPasswordEmailSubject)
End If
RS.Close
Set RS = Nothing
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open "Users", Conn, 2, 2
RS.addnew
RS("Name") = request("Name")
RS("Username") = request("Username")
RS("Password") = request("Password")
RS("Email") = request("Email")
RS("ExpDate") = "999999999"
If ApprovalRequired Then
RS("Status") = "Pending"
Else
RS("Status") = "Active"
End If
RS.update
RS.close
SQL = "SELECT UserID FROM Users ORDER BY UserID DESC"
RS.Open SQL, Conn, 1, 3
UserID = RS("UserID")
RS.Close
RS.Open "UserArea", Conn, 2, 2
RS.addnew
RS("UserID") = UserID
RS("AreaID") = request("AreaID")
RS.update
RS.close
Set RS = Nothing
Response.redirect "o12register.asp?Page=3&LoginUrl="
& LoginURL
End If
%>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
SPONSORED LINKS
Basic programming language Computer programming languages Programming languages
Java programming language The history of computer programming language
---------------------------------
YAHOO! GROUPS LINKS
Visit your group "AspNetAnyQuestionIsOk" on the web.
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
--------------------------------------------------------------------
Krishan Kant Chamoli Office: +91-172-2653886
AuthorGen Technology (P) Ltd., Fax: +91-172-5018485
24/3, Industrial Area, Phase - 2, Mobile: 9888263726
Chandigarh. INDIA. Pin - 160002. Email: [EMAIL PROTECTED]
--------------------------------------------------------------------
Send instant messages to your online friends http://uk.messenger.yahoo.com
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/