473,389 Members | 1,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

problem with ADODB.Recordset (0x800A0BB9)

1
I have two asp files. Login.asp and changePass.asp. what i want to do is to make the user change his password after his first login. so what happens is login.asp is the first to be used then it is passed to changePass.asp but after creating the code. I am getting this error

ADODB.Recordset (0x800A0BB9) Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

The codes are here

Login.asp

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<Title>
Login
</Title>
</HEAD>
<BODY>
<p align="center"><font color="#0000FF" size="5">Insurance System</font></p>
<hr>
<p>
<!-- #include file="adovbs.inc" -->
<%
Response.Buffer = True
If Request.Form ("Submit") <> "Login" then
Response.Cookies("username") = ""
%>
</p>
<FORM ACTION="login.asp" METHOD="post" id=form1 name=form1>
<center><TABLE BORDER=0>
<TR>
<TD ALIGN="right">Username:</TD>
<TD><INPUT NAME="user"></INPUT></TD>
</TR>
<TR>
<TD ALIGN="right">Password:</TD>
<TD><INPUT TYPE="password" NAME="password"></INPUT></TD>
</TR>
<TR>
<TD ALIGN="right"></TD>
<TD><INPUT TYPE="submit" VALUE="Login" name=Submit></INPUT>
<INPUT TYPE="reset" VALUE="Reset" id=reset1 name=reset1></INPUT>
</TD>
</TR>
</TABLE>
</FORM>
<%
Else

Dim DB_CONNECTIONSTRING, objCleanUpRS, iRecordCount, LoginSuccessful
LoginSuccessful = False

DB_CONNECTIONSTRING = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Insurance"

strSQL = "SELECT * FROM Login Where Username = '" & Request.Form("user") & "' and Password = '" & Request.Form("password") & "';"

Dim USE
Dim PAS
USE = cStr(Request.Form("user"))

Set objCleanUpRS = Server.CreateObject("ADODB.Recordset")
objCleanUpRS.Open strSQL, DB_CONNECTIONSTRING, adOpenKeyset, adLockPessimistic, adCmdText

If Not objCleanUpRS.EOF Then
LoginSuccessful=True

if objCleanUpRS.Fields("Times") <> 0 then

If LoginSuccessful then
%>
<center>
<%
Response.Write("login successful")
Response.Cookies("username") = USE
%>
<br><center><a href="#">Go to main page</a>
<%

objCleanUpRS.Close
Set objCleanUpRS = Nothing

End If

else

objCleanUpRS.Close
Set objCleanUpRS = Nothing
%>

<FORM ACTION="changePass.asp" METHOD="post" id=form1 name=form1>
<center><TABLE BORDER=0>
<TR>
Please input a new password to change your temporary password
</TR>
<TR>
<TD ALIGN="right">Password:</TD>
<TD><INPUT TYPE="password" NAME="password"></INPUT></TD>
</TR>
<TR>
<TD ALIGN="right"></TD>
<TD><INPUT TYPE="submit" VALUE="OK" name=Submit></INPUT>
<INPUT TYPE="reset" VALUE="Reset" id=reset1 name=reset1></INPUT>
</TD>
</TR>
</TABLE>
</FORM>
<%
End if

else
%>
<center>
<%
Response.Write("login unsuccessful")
%>
<FORM ACTION="login.asp" METHOD="post" id=form1 name=form1>
<center><TABLE BORDER=0>
<TR>
<TD ALIGN="right">Username:</TD>
<TD><INPUT NAME="user"></INPUT></TD>
</TR>
<TR>
<TD ALIGN="right">Password:</TD>
<TD><INPUT TYPE="password" NAME="password"></INPUT></TD>
</TR>
<TR>
<TD ALIGN="right"></TD>
<TD><INPUT TYPE="submit" VALUE="Login" name=Submit></INPUT>
<INPUT TYPE="reset" VALUE="Reset" id=reset1 name=reset1></INPUT>
</TD>
</TR>
</TABLE>
</FORM>
<%
Response.End
End If

End if
%>
</BODY>
</HTML>


and

changePass.asp

<%
Dim DB_CONNECTIONSTRING, objCleanUpRS

DB_CONNECTIONSTRING = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Insurance"

strSQL = "SELECT * FROM Login WHERE 0 = 1;"

if isNull(Request.Form("password")) <> true then

Set objCleanUpRS = Server.CreateObject("ADODB.Recordset")

objCleanUpRS.Open strSQL, DB_CONNECTIONSTRING, adOpenKeyset, adLockPessimistic, adCmdText

objCleanUpRS.Fields("Password") = Request.Form("password")

objCleanUpRS.Fields("Times") = CStr("1")

objCleanUpRS.Update

objCleanUpRS.Close
Set objCleanUpRS = Nothing

else
%>

<FORM ACTION="changePass.asp" METHOD="post" id=form1 name=form1>
<center><TABLE BORDER=0>
<TR>
Please input a new password to change your temporary password
</TR>
<TR>
<TD ALIGN="right">Password:</TD>
<TD><INPUT TYPE="password" NAME="password"></INPUT></TD>
</TR>
<TR>
<TD ALIGN="right"></TD>
<TD><INPUT TYPE="submit" VALUE="OK" name=Submit></INPUT>
<INPUT TYPE="reset" VALUE="Reset" id=reset1 name=reset1></INPUT>
</TD>
</TR>
</TABLE>
</FORM>

<%

End If
%>


please help me solve this. Thanks:)
Nov 5 '06 #1
0 2875

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

Similar topics

2
by: Daniel | last post by:
Hello, i've created an old-ADO-recordset in C# via the following code: ADODB.RecordsetClass arTest; arTest = new ADODB.RecordsetClass(); arTest.Fields.Append("Field1",
0
by: sonasiva | last post by:
hai Iam creating website using ASP i wnts my clients to register first to vist site using username and password,,this i need to do iam getting error like this ADODB.Recordset (0x800A0BB9)...
2
bmallett
by: bmallett | last post by:
I am getting the following error: Error Type: ADODB.Command (0x800A0BB9) Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.