Having a small problem with a SQL statement and was hoping someone could help out.
Thanks
This is the error I get:
[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
Code:
strUserName = Session("userName")
Set rsEmail = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT email, username FROM tblUsers Where username = " & strUserName
rsEmail.Open strSQL, adoCon
The strUserName is correct I checked that with a Response.Write. don't know if this helps but username isn't the first column or the primary key but there can't be two of the same usernames in that column.