I keep getting a vb "compilation error" probably because my syntax in my code is wrong. I'm trying to compare values from a db to what is entered in a textbox. From there, I want to redirect the user based on their userid.. This is what I have so far: -------------------------------------- If username = "john" Then “Select * From users Where acc_id = ‘“ & Request(“usernamebox textboxâ€) & “’†Response.redirect "home.asp" Elseif username = "ben" Then “Select * From users Where acc_id = ‘“ & Request(“usernamebox textboxâ€) & “’†Response.redirect "home2.asp" 'If Account Doesn't Exist Else Response.write "Account does not exist." End If -------------------------------------- is my sql statement wrong? I'm not quite sure how to set it up. I have made the dsn and opened up the connections and recordset.
What does the compilation error say? I am not familiar with VB, can you point out where you are connecting to the database and sending a mysql query?