Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Type:ADODB.Recordset (0x800A0BB9) Arguments are of the wrong typ

Status
Not open for further replies.

BeginnerProgramer

Programmer
May 19, 2004
5
GB
Hi Can Anybody help am getting this error

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

And i dont know what it is , here's the code from the 2 files that are involved
----------------------------------------------------
Clssfd.asp

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!-- META TYPE ="typelib"
File="C:\Program Files\Common Files\System\ado\msado15.dll" -->
<% Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source = C:\Inetpub\If Session("blnValidUser") = True and Session("UserName") = "" Then
Dim rsUserIdCheck
Set rsUserIdCheck = Server.CreateObject ("ADODB.Recordset")
Dim strSql
strSql = "SELECT UserName From tbl_UserId" & _
"WHERE Email = '" & Session ("Email") & "';"
rsUserIdCheck.Open strSql, objConn
If UserIdCheck.EOF Then
Session ("blnValidUser") = False
Else
Session ("UserName") = rsUserIdCheck ("UserName")
End If
rsUserIdCheck.Close
set rsUserIdCheck = Nothing
End If
%>
--------------------------------------------------
AddUser.asp

<!-- #include file="Clssfd.asp" -->
<%
Dim rsUsers
Set rsUsers = Server.CreateObject("ADODB.Recordset")
rsUsers.Open "tbl_UserId", objConn, adOpenForwardOnly, adLockOptimistic, adCmdTable

If Session("UserID") <> "" Then ' currently logged-on user
rsUsers.Filter = "UserID = '" & Session("UserID") & "'"
Else ' New session
rsUsers.Filter = "UserName = '" & Request.Form("UserName") & "'" & _
"AND Password = '" & Request.Form("Password") & "'"
If rsUsers.EOF Then ' User not found
rsUsers.AddNew ' ...so add a new record
' Else
' Email address and password matched with DB records -
' In this case we'll allow this to update user's personal details
End If
End If

rsUser ("FirstName") = Request.Form ("FirstName")
rsUser ("Surname") = Request.Form ("Surname")
rsUser ("DOB") = Request.Form ("DOB")
rsUser ("Address1") = Request.Form ("Address1")
rsUser ("Address2") = Request.Form ("Address2")
rsUser ("Address3") = Request.Form ("Address3")
rsUser ("Address4") = Request.Form ("Address4")
rsUser ("PostCode") = Request.Form ("PostCode")
rsUser ("Country") = Request.Form ("Country")
rsUser ("Email") = Request.Form ("Email")
rsUser ("UserName") = Request.Form ("UserName")
rsUser ("Password") = Request.Form ("Password")
rsUser ("Active") = True
rsUser ("LastLogin") = Now
rsUser.Update

Dim strName, strValue
For each strField in rsUser.Fields
strField = strField.Name
strValue = strField.Value
Next
Session ("blnValidUser") = True
Response.Redirect "MenuForRegUsers.asp"
%>
---------------------------------------------
Can anybody see anything wrong with my code
 
it will be these lines
strSql = "SELECT UserName From tbl_UserId" & _
"WHERE Email = '" & Session ("Email") & "';"
rsUserIdCheck.Open strSql, objConn


either the email is blank and requires it.

check the value before hand to see if it is populated...if it is blank then probably causing you the problem

SQL is saying i need it and you do not pass it in.
 
TraceyMaryLand

It's say thats there's something wrong with this line

rsUsers.Open "tbl_UserId", objConn, adOpenForwardOnly, adLockOptimistic, adCmdTable

in the AddUser.aps Page

can you think of anything thats wrong with it

 
No whats That dont think i've studyed that yet
Whats it used for , where and how ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top