Ver Mensaje Individual
  #3 (permalink)  
Antiguo 26/09/2007, 12:08
MM5
 
Fecha de Ingreso: septiembre-2007
Mensajes: 5
Antigüedad: 17 años, 7 meses
Puntos: 0
Re: Error en rs.eof = false

Mas informacion para poder resolver el problema
Mi pagina de conexion y ejecucion de Procedimeintos Almacenados es la siguiente
Código:
<%
'***************************************************************************************************************************
Const Connex = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=xxxx;Data Source=xxxxxx"
'***************************************************************************************************************************
Const adAsyncExecute = &H00000010
Const adExecuteNoRecords = &H00000080
Const adStateClosed = &H00000000
Const adStateOpen = &H00000001
Const adStateConnecting = &H00000002
Const adStateExecuting = &H00000004
Const adStateFetching = &H00000008
'***************************************************************************************************************************
dim ParaEnvio(55,3)
dim Obj, Rs, Prm
'***************************************************************************************************************************
Sub Consulta(Proveedor, Procedimiento, CantParametros, ConRecordset)
	Dim Cn
	Set Cn = Server.CreateObject("ADODB.Connection")
		Cn.Open Connex
	Set Obj = Server.CreateObject ("ADODB.Command")
    server.ScriptTimeout = 2000000
	Set Obj.ActiveConnection = Cn
		Obj.CommandText = Procedimiento
		for xx=0 to CantParametros -1
			call Parametro(ParaEnvio(xx, 2),ParaEnvio(xx, 1), ParaEnvio(xx, 0))
			Obj.Parameters.Append Prm
	    next
		Obj.CommandType = 4
		if ConRecordset = "S" then 'Cuando el Sp retorna un Recordset y ademas parametros de Salida  									'NO OCUPAR CUANDO SP HACE UN INSERT
			Set rs = Server.CreateObject("ADODB.Recordset")
			Set rs = Obj.Execute
			Obj.Execute
		elseif ConRecordset = "X" then 'Cuando el SP hace un insert y ademas retorna un Recordset
			Set rs = Server.CreateObject("ADODB.Recordset")
			Set rs = Obj.Execute
		else
			Obj.Execute
		end if

Set Prm = nothing:Set Cn = nothing
End Sub
'***************************************************************************************************************************
Function Parametro(Sentido, valor, nombreParam)
    Set Prm = Server.CreateObject("ADODB.Parameter")
    Prm.Name = nombreParam

    If IsNumeric(valor) = False Then
        Prm.Type = 8: Prm.Value = valor
        If valor = "" Then
            Prm.Size = 200
        Else
            Prm.Size = Len(valor)
        End If
    ElseIf IsNumeric(valor) = True Then
	   if len(valor) >1 then
          if mid(valor,1,1) ="0"then
				Prm.Type = 8:Prm.Size = Len(valor):Prm.Value = valor		  
		  else
				Prm.Type = 5:Prm.Size = Len(valor):Prm.Value = CDbl(valor)
		  end if
	   else
         if len(valor) > 3 then
		 	Prm.Type = 3:Prm.Size = Len(valor):Prm.Value = CDbl(valor)
         else
			Prm.Type = 5:Prm.Size = Len(valor):Prm.Value = CDbl(valor)
		 end if
	   end if 
    End If
    If Sentido = "I" Then
        Prm.Direction = 1'adParamInput
    ElseIf Sentido = "O" Then
        Prm.Direction = 2'adParamOutput
    End If

End Function
%>
y asi invoco para la ejecucion de un sp
call Consulta("Proveedor", "Procedimiento", 5,"X")

if not rs.eof then (En esta sentencia es donde me arroja el error)