I continue to get The following error:Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[TCX][MyODBC]You have an error in your SQL syntax near 'SE.' at line 1
/CheckLoginCVL.asp, line 10
when I am running a script to check the person logging in. The following is my code:
<!--#include file="myconn.asp"-->
<%
Dim strEMail, strPassword
strLogin = Request("Login"
strPassword = Request("Password"
Dim rsUsers
set rsUsers = Server.CreateObject("ADODB.Recordset"
strSQL = "SELECT * FROM tblClient WHERE LoginName = '" & strLogin & "';"
rsUsers.Open strSQL, myconn
If rsUsers.EOF Then ' User not found
Session("ClientID" = Request("ClientID"
If Request("SecondTry" = "True" then ' User's had two goes
Response.Redirect "contact.asp?NotFound=True" ' - must contact CVL
Else ' Username wrong; password wrong
Response.Redirect "default.asp?SecondTry=True" ' - allow another go
End If
Else 'One or more users found - check password
While Not rsUsers.EOF
If UCase(rsUsers("Password") = UCase(strPassword) Then ' password matched
Dim strName, strValue
For Each strField in rsUsers.Fields
strName = strField.Name ' populate session variables
strValue = strField.value
Session(strName) = strValue
Next
Session("blnValidUser" = True
Response.Redirect "welcome.asp" ' successful login
Else
rsUsers.MoveNext
End If
Wend
Session("Login" = Request("Login" ' if we get this far then...
' ...password doesn't match any of DB entries
If Request("SecondTry" = "True" then ' User's had two goes
Response.Redirect "contact.asp" ' - must contact CVL
Else ' Username right; password wrong
Response.Redirect "default.asp?SecondTry=True&WrongPW=True"
'- allow another go
End If
End If
%>
If anyone can offer assistance it would greatly be appreciated.
Thank You,
Stephenie G.
[TCX][MyODBC]You have an error in your SQL syntax near 'SE.' at line 1
/CheckLoginCVL.asp, line 10
when I am running a script to check the person logging in. The following is my code:
<!--#include file="myconn.asp"-->
<%
Dim strEMail, strPassword
strLogin = Request("Login"
strPassword = Request("Password"
Dim rsUsers
set rsUsers = Server.CreateObject("ADODB.Recordset"
strSQL = "SELECT * FROM tblClient WHERE LoginName = '" & strLogin & "';"
rsUsers.Open strSQL, myconn
If rsUsers.EOF Then ' User not found
Session("ClientID" = Request("ClientID"
If Request("SecondTry" = "True" then ' User's had two goes
Response.Redirect "contact.asp?NotFound=True" ' - must contact CVL
Else ' Username wrong; password wrong
Response.Redirect "default.asp?SecondTry=True" ' - allow another go
End If
Else 'One or more users found - check password
While Not rsUsers.EOF
If UCase(rsUsers("Password") = UCase(strPassword) Then ' password matched
Dim strName, strValue
For Each strField in rsUsers.Fields
strName = strField.Name ' populate session variables
strValue = strField.value
Session(strName) = strValue
Next
Session("blnValidUser" = True
Response.Redirect "welcome.asp" ' successful login
Else
rsUsers.MoveNext
End If
Wend
Session("Login" = Request("Login" ' if we get this far then...
' ...password doesn't match any of DB entries
If Request("SecondTry" = "True" then ' User's had two goes
Response.Redirect "contact.asp" ' - must contact CVL
Else ' Username right; password wrong
Response.Redirect "default.asp?SecondTry=True&WrongPW=True"
'- allow another go
End If
End If
%>
If anyone can offer assistance it would greatly be appreciated.
Thank You,
Stephenie G.