HELP with error ''80020009''

  • 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.

  • perhaps this

    http://support.microsoft.com/kb/175239

    Is the server up to date with patches?

  • 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


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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 %>

  • 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


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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"

  • 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

    http://amcan-impex.com

  • 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

  • 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

  • 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.

  • after running query got:

    'rsLogin' is not a recognized function name.

    no experience with .asp

  • after executing query got:

    'rsLogin' is not a recognized function name.

    not experienced with asp

  • you still have the line

    Set rsLogin = conn2.Execute(SQLQuery2) ?

  • 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