scroots
11-16-2002, 04:25 PM
i have the following code:
<% @LANGUAGE = VBSCRIPT %>
<% Option Explicit %>
<%
Dim uname, pword
uname = Request.Form("uname")
pword = Request.Form("pword")
Dim cmdGetUser, rsGetUser
Set cmdGetUser = Server.CreateObject.Command
cmdGetUSer.ActiveConnection = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("loginauth.mdb")
cmdGetUser.CommandText = "SELECT * FROM tbl_Users WHERE tblUsers.username = '" & uname '""
cmdGetUser.CommandType = adCmdText
Set rsGetUser = cmdGetUser.Execute
Set cmdGetUser = Nothing
While Not rsGetUser.EOF
If UCase(uname) = Ucase(rsGetUser("username")) Then
If UCase(pword) = Ucase(rsGetUser("password")) Then
Session("UserID") = rsGetUser("UserID")
Response.Redirect "success.asp"
Else
Response.Redirect "plogin.asp?error=password"
End If
Else
Response.Redirect "plogin.asp?error=username"
End If
rsGetUser.Close()
Set rsGetUser = Nothing
%>
and it produces the following error:
Microsoft VBScript compilation error '800a03fa'
Expected 'Wend'
/Password Web/checklogin.asp, line 32
i have highlighted line 32, can anoyone help? i don`t even know what a wend is.
thanks in advance
scroots
<% @LANGUAGE = VBSCRIPT %>
<% Option Explicit %>
<%
Dim uname, pword
uname = Request.Form("uname")
pword = Request.Form("pword")
Dim cmdGetUser, rsGetUser
Set cmdGetUser = Server.CreateObject.Command
cmdGetUSer.ActiveConnection = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("loginauth.mdb")
cmdGetUser.CommandText = "SELECT * FROM tbl_Users WHERE tblUsers.username = '" & uname '""
cmdGetUser.CommandType = adCmdText
Set rsGetUser = cmdGetUser.Execute
Set cmdGetUser = Nothing
While Not rsGetUser.EOF
If UCase(uname) = Ucase(rsGetUser("username")) Then
If UCase(pword) = Ucase(rsGetUser("password")) Then
Session("UserID") = rsGetUser("UserID")
Response.Redirect "success.asp"
Else
Response.Redirect "plogin.asp?error=password"
End If
Else
Response.Redirect "plogin.asp?error=username"
End If
rsGetUser.Close()
Set rsGetUser = Nothing
%>
and it produces the following error:
Microsoft VBScript compilation error '800a03fa'
Expected 'Wend'
/Password Web/checklogin.asp, line 32
i have highlighted line 32, can anoyone help? i don`t even know what a wend is.
thanks in advance
scroots