Visual Basic - El sp devuelve el error 3704

Life is soft - evento anual de software empresarial
 
Vista:

El sp devuelve el error 3704

Publicado por Andres Tabares (2 intervenciones) el 09/06/2005 19:40:57
Hola Comunidad

Resulta que en mi aplicacion de se ejecuta un procedimiento almacenado algo parecido a esto

Set CmdGrafica = New ADODB.Command
Set Reg = New ADODB.Recordset

With CmdGrafica
.CommandType = adCmdStoredProc
.CommandText = "spGraficaTiemposPerdidos"
.Parameters.Append .CreateParameter("@strFechaIni", adVarChar, adParamInput, 10, datFechaInicial.Value)
.Parameters.Append .CreateParameter("@strFechaFin", adVarChar, adParamInput, 10, datFechaFinal.Value)
.Parameters.Refresh
.ActiveConnection = Conexion
.CommandTimeout = 360
Set Reg = .Execute
Reg.Close
MsgBox Reg.RecordCount
End With

Supuestamente en la variable Reg me queda lo que devovio el sp pero si despues del End With coloco

Do While Not Reg.Eof
operaciones
.
.
.
loop´

Me saca un error que dice

Error Numero: 3704
Descripcion: La operation is not allowed when the object is closed

Gracias a todos por la ayuda.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder