Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/10/2010, 13:37
dhs311
 
Fecha de Ingreso: julio-2010
Mensajes: 4
Antigüedad: 14 años, 4 meses
Puntos: 0
Se requiere un objeto: ''

Hola gente, estoy teniendo un problema en el q llevo ya varios dias en tratar de solucionarlo... al ejecutarlo me da el error:

Tipo de error:
Error de Microsoft VBScript en tiempo de ejecución (0x800A01A8)
Se requiere un objeto: ''
/paglia/Admin/login.asp, línea 39

Esta es la linea 39:

MM_rsUser_cmd.CommandText = MM_loginSQL

Copio el código completo, si alguien puede darme una mano estaré muy agradecido.


<!--#include file="../Admin/FuncAdmin.asp" -->
<%
Dim rsUsuarios
Dim rsUsuarios_cmd
Dim rsUsuarios_numRows

rsUsuarios_cmd = "SELECT usu_codigo, ussuari, usu_contra, usu_nombre, usu_apelli, usu_empres, usu_tipusu FROM usu"
AbrirCon Con
AbrirSQL Con,rsUsuarios,rsUsuarios_cmd

%>
<%
' *** 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
Dim MM_fldUserAuthorization
Dim MM_redirectLoginSuccess
Dim MM_redirectLoginFailed
Dim MM_loginSQL
Dim MM_rsUser
Dim MM_rsUser_cmd

MM_fldUserAuthorization = "usu_tipusu"
MM_redirectLoginSuccess = "/Admin/FormMenuAdmin.asp"
MM_redirectLoginFailed = "/Admin/loginError.asp"

MM_loginSQL = "SELECT ussuari, usu_contra"
If MM_fldUserAuthorization <> "" Then MM_loginSQL = MM_loginSQL & "," & MM_fldUserAuthorization
MM_loginSQL = MM_loginSQL & " FROM usu WHERE ussuari = ? AND usu_contra = ?"

'MM_loginSQL = MM_loginSQL & " FROM usu WHERE ussuari = ? AND usu_contra = ?"
'Set MM_rsUser_cmd = Server.CreateObject ("ADODB.Command")
'MM_rsUser_cmd.ActiveConnection = MM_BasePagliaroli_STRING

MM_rsUser_cmd.CommandText = MM_loginSQL
MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param1", 200, 1, 25, MM_valUsername) ' adVarChar
MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param2", 200, 1, 25, Request.Form("password")) ' adVarChar

AbrirCon Con
AbrirSQL Con,MM_rsUser,MM_loginSQL


'MM_rsUser_cmd.Prepared = true
'Set MM_rsUser = MM_rsUser_cmd.Execute

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
%>


Saludos.