Olá,
Existe algum erro no Componente de Login abaixo?
Sendo que a parte de conexão está como se fosse advinda de um módulo, não vou criá-la no componente.
Este componente tem q retornar o IdUsuario caso Usuario e Senha estejam corretas.
Vejam:
Public Function Logar(strUsuario as String, strSenha as String) as Boolean
Dim strSQL as String
Dim objRs as new ADODB.RecordSet
strSQL = "Select IdUsuario from Usuarios where Usuario = '" & Usuario _
& "' and Senha = '" & Senha & "'"
Set objRs = objCon.Execute(strSQL)
Logar = objRs.EOF
End Function
E para instanciar este comp. no ASP a sintaxe está correta?
Vejam:
<%
Dim objLogar
Set objLogar = Server.CreateObject("MeuCompLogin.Logar")
'OU
Set objLogar = Server.CreateObject("MeuCompLogin")
%>
Grato,