..:: MX Studio Fóruns ::..: ASP+VBScript (Ajuda...) - ..:: MX Studio Fóruns ::..

Jump to content

Publicidade




ATENÇÃO

Para evitar posts desnecessários e que não influam para o andamento e desenvolvimento do fórum, clique aqui e leia todas as regras.
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

ASP+VBScript (Ajuda...) Erro de sintaxe na cláusula FROM.

#1 User is offline   dudesigner 

  • Group: Membros
  • Posts: 33
  • Joined: 03-July 06

  Posted 17 March 2007 - 06:52 PM

Olá galera td bem???
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
%>


Se alguém puder me ajudar???
Desde ja agradeço...

0

#2 User is offline   dudesigner 

  • Group: Membros
  • Posts: 33
  • Joined: 03-July 06

Posted 18 March 2007 - 09:37 PM

Por favor meus colegas, me de uma luz para poder resolver este problema????
0

#3 User is offline   Bertizini 

  • Group: Membros
  • Posts: 58
  • Joined: 18-November 05

Posted 27 March 2007 - 09:38 AM

Grande,

Só uma dúvida:
Pq vc está usando [] entre o nome da tabela?
Vc já tentou retirar isso?

Inté
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


Similar Topics Collapse

  Topic Forum Started By Stats Last Post Info
New Replies Montando fórum
preciso de ajuda!
Dúvidas Gerais PHPG 
  • 0 Replies
  • 435 Views
New Replies Preciso de AJUDA!!!! ACTIONS PHOTO SHOP
ACTIONS de PHOTO SHOP
Photoshop & Image Ready D4NG3R 
  • 0 Replies
  • 790 Views
New Replies Ajuda com comando "for" (please, please, urgente)
Pode ser de outra forma se souberem como...
Flash & ActionScript Eduardo Louzada 
  • 5 Replies
  • 872 Views
New Replies Passar o valor do Input para o PHP
Veja o erro no link
Flash & ActionScript gajowebmaster 
  • 1 Reply
  • 889 Views
New Replies Ajuda com tabelas
Como proceder?
PHP paulofbc 
  • 2 Replies
  • 773 Views
New Replies Me ajuda aew pessoal pf....
problema com gif animado
Flash & ActionScript zordlyon 
  • 0 Replies
  • 439 Views
New Replies Realidade virtual ajuda pacientes a aliviar a dor Notícias Notícias 
  • 0 Replies
  • 132 Views
New Replies Ajuda na barra de vida
Decrementando continuamente a barra
Desenvolvimento de Jogos J Pereira Lima 
  • 7 Replies
  • 1681 Views

Publicidade




1 User(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)