Ok, here is my first suggestion, having worked with both now for a while.
Don't use the rs.open property.  Not only is it slower, but it is more prone
to errors...  So try it this way:

strSQL = "SELECT username, codeid FROM user_votes WHERE username = '" & user
& "'"
Set rs = dbconn.Execute(strSQL)
If rs("codeid") = codeid Then
        rs.close
        Set rs = nothing
        dbconn.close
        set dbconn = nothing
        Response.Redirect
"show.asp?response=You've%20already%20voted&codeid=" & codeid & "&category="
& category
Else
        'Whatever
End If

Yes, there are more lines of code, but it is much easier to read and then
debug later.  However, I would also try adding in a response.write strSQL
somewhere to make sure that your SQL is being generated correctly.

Glen

-----Original Message-----
From: Deryck Henson [mailto:[EMAIL PROTECTED]] 
Sent: Friday, September 14, 2001 1:56 AM
To: MySQL
Subject: Trouble with SELECT * FROM...


OK, well, as you all know, I am using mysql only for ASP Connectivity. Sooo,
this is my question:  Every time I try to use this statement to open a
table, it gives me an error::

statement used-

rs.open "SELECT username, codeid FROM user_votes where username =
'"&user&"'", dbconn if rs.fields("codeid") = codeid then response.redirect
"show.asp?response=Youve%20already%20voted&codeid="&codeid&"&category="&cate
gory&"" else

error returned-

error '80020009'
Exception occurred.

any help?  The fields 'CodeID' has a Text DATATYPE.

- Deryck H
- http://www.comp-u-exchange.com


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to