Foros del Web » Programando para Internet » ASP Clásico »

Nuevo Problemilla...

Estas en el tema de Nuevo Problemilla... en el foro de ASP Clásico en Foros del Web. vuelvo a tener otro pequeño problemilla... El error es: hola cara cola Error de Microsoft VBScript en tiempo de ejecución error '800a01a8' Se requiere un ...
  #1 (permalink)  
Antiguo 22/08/2004, 08:12
Avatar de ken-obi  
Fecha de Ingreso: julio-2004
Ubicación: Alicante
Mensajes: 314
Antigüedad: 19 años, 10 meses
Puntos: 6
Nuevo Problemilla...

vuelvo a tener otro pequeño problemilla...

El error es:
hola cara cola
Error de Microsoft VBScript en tiempo de ejecución error '800a01a8'

Se requiere un objeto

/login.asp, línea 56

Y el Codigo:
Código:
<!--#include file='dbconnection.inc'--> 

<% 

'Dimension variables
Dim rsCheckUser   'Holds the recordset for the records in the database
Dim strSQL          'Holds the SQL query to query the database 
Dim strUserName 	'Holds the user name

'Initalise the strUserName variable
strUserName = Request.Form("txtUserName")

'Create an ADO recordset object
Set rsCheckUser = Server.CreateObject("ADODB.Recordset")

'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT password, ID, username, admin, lastname, aim, email, suspend FROM tblUsers WHERE username ='" & strUserName & "'"

'Open the recordset with the SQL query 
rsCheckUser.Open strSQL, adoCon

'If the recordset finds a record for the username entered then read in the password for the user
If NOT rsCheckUser.EOF Then

	'Read in the password for the user from the database
	If (Request.Form("txtUserPass")) = rsCheckUser("password") Then
	

	     If rsCheckUser("suspend") = 0 Then
		 'Write the HTML to display the current record in the recordset

			Session("userGood") = True
			Session("userID") = rsCheckUser("ID")
			Session("userName") = rsCheckUser("username")
			Session("userAdmin") = rsCheckUser("admin")
		 	Session("lastName") = rsCheckUser ("lastname")
			Session("aIm") = rsCheckUser ("aim")
			Session("Email") = rsCheckUser ("email")
		 Else 
		 Response.Redirect("solosocios.asp?mode=suspend")
		 End If
	 
		
	'Reset server objects
	rsCheckUser.Close
	Set rsCheckUser = Nothing
	Set adoCon = Nothing

	'Redirect to the authorised user page and send the users name
	response.write("hola cara cola")

End If
End If
'Reset server objects

rsCheckUser.Close
Set rsCheckUser = Nothing
Set adoCon = Nothing

'If the script is still running then the user must not be authorised
Session("userGood") = False

'Redirect to the unautorised user page
Response.Redirect"entrar.asp?url=2"
%>
porque....
__________________
Un mundo sin fin... !!! viva los moros y cristianos de ELDA !!!

Última edición por ken-obi; 22/08/2004 a las 08:37 Razón: problema solucionado....lo siento
  #2 (permalink)  
Antiguo 22/08/2004, 09:15
Avatar de lexus  
Fecha de Ingreso: enero-2002
Ubicación: Cali - Colombia
Mensajes: 2.234
Antigüedad: 22 años, 5 meses
Puntos: 4
hola, prueba dejando solo una ves la cerrada de objetos, no lo coloques 2 veces.
suerte.
Código:
   
<!--#include file='dbconnection.inc'--> 

<% 

'Dimension variables
Dim rsCheckUser   'Holds the recordset for the records in the database
Dim strSQL		  'Holds the SQL query to query the database 
Dim strUserName 'Holds the user name

'Initalise the strUserName variable
strUserName = Request.Form("txtUserName")

'Create an ADO recordset object
Set rsCheckUser = Server.CreateObject("ADODB.Recordset")

'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT password, ID, username, admin, lastname, aim, email, suspend FROM tblUsers WHERE username ='" & strUserName & "'"

'Open the recordset with the SQL query 
rsCheckUser.Open strSQL, adoCon

'If the recordset finds a record for the username entered then read in the password for the user
If NOT rsCheckUser.EOF Then

'Read in the password for the user from the database
If (Request.Form("txtUserPass")) = rsCheckUser("password") Then


	 If rsCheckUser("suspend") = 0 Then
'Write the HTML to display the current record in the recordset

Session("userGood") = True
Session("userID") = rsCheckUser("ID")
Session("userName") = rsCheckUser("username")
Session("userAdmin") = rsCheckUser("admin")
Session("lastName") = rsCheckUser ("lastname")
Session("aIm") = rsCheckUser ("aim")
Session("Email") = rsCheckUser ("email")
Else 
Response.Redirect("solosocios.asp?mode=suspend")
End If


'Reset server objects
rsCheckUser.Close
Set rsCheckUser = Nothing
Set adoCon = Nothing

'Redirect to the authorised user page and send the users name
response.write("hola cara cola")

End If
End If
'Reset server objects

rsCheckUser.Close
Set rsCheckUser = Nothing
Set adoCon = Nothing

'If the script is still running then the user must not be authorised
Session("userGood") = False

'Redirect to the unautorised user page
Response.Redirect"entrar.asp?url=2"
%>
__________________
Control de Visitantes, Control de Accesos, Minutas digitales, Manejo de Correspondencia
http://www.controldevisitantes.com
  #3 (permalink)  
Antiguo 22/08/2004, 11:19
Avatar de ken-obi  
Fecha de Ingreso: julio-2004
Ubicación: Alicante
Mensajes: 314
Antigüedad: 19 años, 10 meses
Puntos: 6
Muchas gracias ya lo solucione... esque llevo muchas horas sin dormir y no furula na d naaaaa....GRACIAS...
Código:
   
<!--#include file='dbconnection.inc'--> 

<% 

'Dimension variables
Dim rsCheckUser   'Holds the recordset for the records in the database
Dim strSQL		  'Holds the SQL query to query the database 
Dim strUserName 'Holds the user name

'Initalise the strUserName variable
strUserName = Request.Form("txtUserName")

'Create an ADO recordset object
Set rsCheckUser = Server.CreateObject("ADODB.Recordset")

'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT password, ID, username, admin, lastname, aim, email, suspend FROM tblUsers WHERE username ='" & strUserName & "'"

'Open the recordset with the SQL query 
rsCheckUser.Open strSQL, adoCon

'If the recordset finds a record for the username entered then read in the password for the user
If NOT rsCheckUser.EOF Then

'Read in the password for the user from the database
If (Request.Form("txtUserPass")) = rsCheckUser("password") Then


	 If rsCheckUser("suspend") = 0 Then
'Write the HTML to display the current record in the recordset

Session("userGood") = True
Session("userID") = rsCheckUser("ID")
Session("userName") = rsCheckUser("username")
Session("userAdmin") = rsCheckUser("admin")
Session("lastName") = rsCheckUser ("lastname")
Session("aIm") = rsCheckUser ("aim")
Session("Email") = rsCheckUser ("email")
Else 
Response.Redirect("solosocios.asp?mode=suspend")
End If


'Reset server objects
rsCheckUser.Close
Set rsCheckUser = Nothing
Set adoCon = Nothing

'Redirect to the authorised user page and send the users name
response.write("hola cara cola")

End If
End If
%>
__________________
Un mundo sin fin... !!! viva los moros y cristianos de ELDA !!!
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 14:24.