Estou tentando fazer um sistena de login que utiliza ASP+VBScript
Ao tentar rodar pelo localhost:
ERRO:
Microsoft JET Database Engine (0x80040E14)
Erro de sintaxe na cláusula FROM.
/dudesigner/cadcliente/login.asp, line 35
Tipo de navegador:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Alexa Toolbar; FDM; InfoPath.2)
Página:
POST 40 bytes to /dudesigner/cadcliente/login.asp
POST Data:
usuario=duardo&senha=duardo&Submit=Logar
LOGIN.ASP
CODE
<%@LANGUAGE="VBSCRIPT"%>
<!--#include virtual="/dudesigner/cadcliente/Connections/conexao.asp" -->
<%
Dim RSCLIENTE
Dim RSCLIENTE_numRows
Set RSCLIENTE = Server.CreateObject("ADODB.Recordset")
RSCLIENTE.ActiveConnection = MM_conexao_STRING
RSCLIENTE.Source = "SELECT password, user FROM [Cadastro de Cliente]"
RSCLIENTE.CursorType = 0
RSCLIENTE.CursorLocation = 2
RSCLIENTE.LockType = 1
RSCLIENTE.Open()
RSCLIENTE_numRows = 0
%>
<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
MM_valUsername=CStr(Request.Form("usuario"))
If MM_valUsername <> "" Then
MM_fldUserAuthorization=""
MM_redirectLoginSuccess="/dudesigner/cadcliente/default.asp" [color="#FF0000"]Pagina se der certo[/color]
MM_redirectLoginFailed="/dudesigner/cadcliente/login.asp" [color="#FF0000"]Pagina se der errado[/color]
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = MM_conexao_STRING
MM_rsUser.Source = "SELECT user, password"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM Cadastro de Cliente WHERE user='" & Replace(MM_valUsername,"'","''") &"' AND password='" & Replace(Request.Form("senha"),"'","''") & "'"
MM_rsUser.CursorType = 0
MM_rsUser.CursorLocation = 2
MM_rsUser.LockType = 3
MM_rsUser.Open
If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
' username and password match - this is a valid user
Session("MM_Username") = MM_valUsername
If (MM_fldUserAuthorization <> "") Then
Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
Else
Session("MM_UserAuthorization") = ""
End If
if CStr(Request.QueryString("accessdenied")) <> "" And true Then
MM_redirectLoginSuccess = Request.QueryString("accessdenied")
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginSuccess)
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginFailed)
End If
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
}
.style2 {font-family: Verdana, Arial, Helvetica, sans-serif}
-->
</style>
</head>
<body>
<form id="form1" name="form1" method="POST" action="<%=MM_LoginAction%>">
<table width="318" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000">
<tr>
<td width="314"><table width="337" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
<tr>
<td width="116"> </td>
<td width="72"> </td>
<td width="52"> </td>
<td width="97"> </td>
</tr>
<tr>
<td rowspan="3"><img src="/dudesigner/cadcliente/imagens/segurança.gif" width="116" height="117" /></td>
<td height="29" colspan="3" class="style2"><div align="center" class="style1">Área Restrita...</div></td>
</tr>
<tr>
<td><div align="right" class="style1"><span class="style11"> Usuario:</span></div></td>
<td height="37" colspan="2"><input name="usuario" type="text" id="usuario" size="15" maxlength="10" /></td>
</tr>
<tr>
<td><div align="right" class="style1"><span class="style11">Senha:</span></div></td>
<td height="22" colspan="2"><input name="senha" type="password" id="senha" size="15" maxlength="6" /></td>
</tr>
<tr>
<td height="19"> </td>
<td> </td>
<td> </td>
<td><div align="center" class="style9">
<label>
<input type="submit" name="Submit" value="Logar" />
</label>
</div></td>
</tr>
</table></td>
</tr>
</table>
</form>
</body>
</html>
<%
RSCLIENTE.Close()
Set RSCLIENTE = Nothing
%>
<!--#include virtual="/dudesigner/cadcliente/Connections/conexao.asp" -->
<%
Dim RSCLIENTE
Dim RSCLIENTE_numRows
Set RSCLIENTE = Server.CreateObject("ADODB.Recordset")
RSCLIENTE.ActiveConnection = MM_conexao_STRING
RSCLIENTE.Source = "SELECT password, user FROM [Cadastro de Cliente]"
RSCLIENTE.CursorType = 0
RSCLIENTE.CursorLocation = 2
RSCLIENTE.LockType = 1
RSCLIENTE.Open()
RSCLIENTE_numRows = 0
%>
<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
MM_valUsername=CStr(Request.Form("usuario"))
If MM_valUsername <> "" Then
MM_fldUserAuthorization=""
MM_redirectLoginSuccess="/dudesigner/cadcliente/default.asp" [color="#FF0000"]Pagina se der certo[/color]
MM_redirectLoginFailed="/dudesigner/cadcliente/login.asp" [color="#FF0000"]Pagina se der errado[/color]
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = MM_conexao_STRING
MM_rsUser.Source = "SELECT user, password"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM Cadastro de Cliente WHERE user='" & Replace(MM_valUsername,"'","''") &"' AND password='" & Replace(Request.Form("senha"),"'","''") & "'"
MM_rsUser.CursorType = 0
MM_rsUser.CursorLocation = 2
MM_rsUser.LockType = 3
MM_rsUser.Open
If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
' username and password match - this is a valid user
Session("MM_Username") = MM_valUsername
If (MM_fldUserAuthorization <> "") Then
Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
Else
Session("MM_UserAuthorization") = ""
End If
if CStr(Request.QueryString("accessdenied")) <> "" And true Then
MM_redirectLoginSuccess = Request.QueryString("accessdenied")
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginSuccess)
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginFailed)
End If
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
}
.style2 {font-family: Verdana, Arial, Helvetica, sans-serif}
-->
</style>
</head>
<body>
<form id="form1" name="form1" method="POST" action="<%=MM_LoginAction%>">
<table width="318" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000">
<tr>
<td width="314"><table width="337" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
<tr>
<td width="116"> </td>
<td width="72"> </td>
<td width="52"> </td>
<td width="97"> </td>
</tr>
<tr>
<td rowspan="3"><img src="/dudesigner/cadcliente/imagens/segurança.gif" width="116" height="117" /></td>
<td height="29" colspan="3" class="style2"><div align="center" class="style1">Área Restrita...</div></td>
</tr>
<tr>
<td><div align="right" class="style1"><span class="style11"> Usuario:</span></div></td>
<td height="37" colspan="2"><input name="usuario" type="text" id="usuario" size="15" maxlength="10" /></td>
</tr>
<tr>
<td><div align="right" class="style1"><span class="style11">Senha:</span></div></td>
<td height="22" colspan="2"><input name="senha" type="password" id="senha" size="15" maxlength="6" /></td>
</tr>
<tr>
<td height="19"> </td>
<td> </td>
<td> </td>
<td><div align="center" class="style9">
<label>
<input type="submit" name="Submit" value="Logar" />
</label>
</div></td>
</tr>
</table></td>
</tr>
</table>
</form>
</body>
</html>
<%
RSCLIENTE.Close()
Set RSCLIENTE = Nothing
%>
Se alguém puder me ajudar???
Desde ja agradeço...

Help














