February 7, 2007 at 7:01 pm
error '80020009'
Exception occurred.
/index.asp, line 230
SQLQuery2 = "sp_getLogin '" & rsProductList2("SellerID") & "'"
Set rsLogin = conn2.Execute(SQLQuery2)
LINE 230------->>>> If rsLogin("UserType") = "user" OR rsLogin("UserType") = "cust" Then %>
I'M STUCK WITH THIS.
HELP WILL BE APPRECIATED
Special thanks to Russel Loski.
February 8, 2007 at 5:00 am
February 8, 2007 at 6:03 am
also, check the actual values:
If rsLogin("UserType") = "user" OR rsLogin("UserType") = "cust" Then %>
if rsLogin("UserType") is NULL, an error would occur. check the table that contains the column UserType and see if any of the values are null.
Lowell
February 14, 2007 at 7:59 am
Unable to find a fix
still getting error:
error '80020009'
Exception occurred.
/index.asp, line 230
If rsLogin("UserType") = "user" OR rsLogin("UserType") = "cust" Then %>
February 14, 2007 at 9:00 am
you didn't post any changes, so I'm assuming you are still not checking for nulls.
add this function to the page:
Private Function tnull(s) As String
If IsNull(s) Or IsEmpty(s) Then
tnull = ""
Else
tnull = s
End If
End Function
then change the line of code in question to this:
If tnull(rsLogin("UserType")) = "user" OR tnull(rsLogin("UserType")) = "cust"
this will change the null to an empty string, and the validation will not blow up.
However, if your page thinks EVERYONE is either a user or a cust, and this one is "" ,empty string., should it still be processed, because the UserType is blank? should you assume all empty string userTypes are "cust" or something?
Lowell
February 14, 2007 at 9:46 am
I did
now not displaying the page at all
just getting error:
Microsoft VBScript compilation error '800a03f9'
Expected 'Then'
/index.asp, line 238
If tnull(rsLogin("UserType")) = "user" OR tnull(rsLogin("UserType")) = "cust"
February 14, 2007 at 9:53 am
fixed partialy with your string
now gettinge another type of error:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'tnull'
/index.asp, line 238
If tnull(rsLogin("UserType")) = "user" OR tnull(rsLogin("UserType")) = "cust" Then %>
here is the page link
February 14, 2007 at 10:29 am
Have you included the function tnull before you call tnull?
You could also change null to IsNull.(Haven't got any empty values yet)
To be really sure you should test if sp_getLogin returns any records.
If rsLogin.recordcount>0 then
...
else
'login doesn't exists...
end if
February 14, 2007 at 10:40 am
I'm lost
I lost my DB guy and I'm with ZERO knowledge with DB.
I appreciate you trying to help but i guess i can't get it.
Would you like to take a look @ my DB and figure this out - i'm dessperate.
I will PM the login info for db and for web host
February 14, 2007 at 11:06 am
Do you have experience with asp?
Step 1: create connection
Step 2: execute query
Step 3: check if there are any results .eof
Step 4: process results
Step 5: close recordset
The function IsNull transforms any NULL values to an empty string "".Did one of the records had UserType = NULL (where UserType is null)?
Have a look at an ASP tutorial:
http://www.advantage.co.nz/ur/aspquiz.htm
You made the excellent step to use stored procedurs (sp_GetLogin) instead of open queries.
February 14, 2007 at 11:10 am
after running query got:
'rsLogin' is not a recognized function name.
no experience with .asp
February 14, 2007 at 11:12 am
after executing query got:
'rsLogin' is not a recognized function name.
not experienced with asp
February 14, 2007 at 1:03 pm
you still have the line
Set rsLogin = conn2.Execute(SQLQuery2) ?
February 14, 2007 at 1:16 pm
yes
i guess that all my db is messed-up
posting or aproving does not work
i don't know what happened with it...
Viewing 14 posts - 1 through 13 (of 13 total)
You must be logged in to reply to this topic. Login to reply