Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP and MySQL Connections Issues

Status
Not open for further replies.

sgloden

IS-IT--Management
Jun 14, 2002
2
US
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=&quot;myconn.asp&quot;-->
<%
Dim strEMail, strPassword
strLogin = Request(&quot;Login&quot;)
strPassword = Request(&quot;Password&quot;)

Dim rsUsers
set rsUsers = Server.CreateObject(&quot;ADODB.Recordset&quot;)
strSQL = &quot;SELECT * FROM tblClient WHERE LoginName = '&quot; & strLogin & &quot;';&quot;
rsUsers.Open strSQL, myconn

If rsUsers.EOF Then ' User not found
Session(&quot;ClientID&quot;) = Request(&quot;ClientID&quot;)
If Request(&quot;SecondTry&quot;) = &quot;True&quot; then ' User's had two goes
Response.Redirect &quot;contact.asp?NotFound=True&quot; ' - must contact CVL
Else ' Username wrong; password wrong
Response.Redirect &quot;default.asp?SecondTry=True&quot; ' - allow another go
End If
Else 'One or more users found - check password
While Not rsUsers.EOF
If UCase(rsUsers(&quot;Password&quot;)) = 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(&quot;blnValidUser&quot;) = True
Response.Redirect &quot;welcome.asp&quot; ' successful login
Else
rsUsers.MoveNext
End If
Wend
Session(&quot;Login&quot;) = Request(&quot;Login&quot;) ' if we get this far then...
' ...password doesn't match any of DB entries

If Request(&quot;SecondTry&quot;) = &quot;True&quot; then ' User's had two goes
Response.Redirect &quot;contact.asp&quot; ' - must contact CVL
Else ' Username right; password wrong
Response.Redirect &quot;default.asp?SecondTry=True&WrongPW=True&quot;
'- allow another go
End If
End If
%>

If anyone can offer assistance it would greatly be appreciated.

Thank You,
Stephenie G.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top