0x80020009 Error

Discussion in 'ASP General' started by John Smith, Jun 13, 2004.

  1. John Smith

    John Smith Guest

    Hi,

    I am just trying to do a fairly boring bit of DB maintainence that involves
    getting the correct ID from table2 by matching it with the email field of
    table2, easy I thought !

    Unfortuantley I get a 0x80020009 'Exception Occured' whenever I try to run
    this. I originally thought that it could be because the email from the first
    table isn't actually in the second table, sadly there are too many to
    manually check, so the idea might have to be completely thrown out of the
    window.

    Could anyone shed any light on why it wouldn't run apart from the data not
    matching ?

    Thanks

    J.




    strQuery ="SELECT email_add,userid FROM email_check"
    set objRS = objConn.Execute(strQuery)

    Do Until objRS.EOF

    strQuery1 ="SELECT userid,email_add FROM events_one WHERE email_add='" &
    objRS("email_add") & "'"
    set objRS1 = objConn.Execute(strQuery1)

    Response.Write(objRS1("userid") & " " & objRS1("email_add") & "<br>")

    objRS.MoveNext
    Loop
     
    John Smith, Jun 13, 2004
    #1
    1. Advertising

  2. John Smith

    Evertjan. Guest

    John Smith wrote on 13 jun 2004 in
    microsoft.public.inetserver.asp.general:

    > Unfortuantley I get a 0x80020009 'Exception Occured'
    >
    > strQuery ="SELECT email_add,userid FROM email_check"
    > set objRS = objConn.Execute(strQuery)
    >
    > Do Until objRS.EOF
    >
    > strQuery1 ="SELECT userid,email_add FROM events_one WHERE email_add='"
    > & objRS("email_add") & "'"
    > set objRS1 = objConn.Execute(strQuery1)
    >
    > Response.Write(objRS1("userid") & " " & objRS1("email_add") & "<br>")
    >
    > objRS.MoveNext
    > Loop
    >


    strQuery ="SELECT email_add,userid FROM email_check"
    set objRS = objConn.Execute(strQuery)

    Do Until objRS.EOF
    Response.Write "====== " & objRS("userid") & " =====<br>"

    strQuery1 ="SELECT userid,email_add FROM events_one"&_
    " WHERE email_add='" & objRS("email_add") & "'"

    set objRS1 = objConn.Execute(strQuery1)

    If not objRS1.EOF then ' could be none
    Do Until objRS1.EOF 'could be more than one
    Response.Write objRS1("userid") & " " &_
    objRS1("email_add") & "<br>"
    objRS1.MoveNext
    Loop
    Else
    Response.Write "No corresponding email_adds found<br>"
    End If
    objRS.MoveNext
    Loop

    not tested !!

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Jun 13, 2004
    #2
    1. Advertising

  3. John Smith

    John Smith Guest

    <snip>
    >
    > not tested !!
    >
    > --
    > Evertjan.
    > The Netherlands.
    > (Please change the x'es to dots in my emailaddress)


    Very cunning ! There was one missing & now my original code works fine as
    well :eek:)

    Dunno why I didn't think of that, obviously a long day !

    Thanks

    J.
     
    John Smith, Jun 13, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. hfk0
    Replies:
    2
    Views:
    21,688
  2. JavaQueries
    Replies:
    1
    Views:
    3,695
    John C. Bollinger
    Mar 1, 2005
  3. Balaji
    Replies:
    3
    Views:
    10,130
  4. Bishop
    Replies:
    1
    Views:
    801
    Bishop
    Feb 24, 2007
  5. juvi
    Replies:
    3
    Views:
    1,057
    Alexey Smirnov
    Jan 22, 2009
Loading...

Share This Page