0x80020009 Error

J

John Smith

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
 
E

Evertjan.

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 !!
 
J

John Smith

not tested !!

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top