p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

asp_databases thread: RES: Error:Operation is not allowed when the object is closed


Message #1 by "=?iso-8859-1?Q?M=E1rcio_S._Sartini?=" <marcio@s...> on Tue, 4 Jun 2002 14:31:00 -0300
what kind of object [rs] variables is openning??

rs is null..

Márcio


-----Mensagem original-----
De: Catherine Michel [mailto:cmichel101@h...]
Enviada em: terça-feira, 4 de junho de 2002 15:44
Para: ASP Databases
Assunto: [asp_databases] Error:Operation is not allowed when the object
is closed


Hi!
I have a command object and the command type is a stored procedure. The
stored procedure is a select statement.  I want to view 5 result per page
This is some of my code:

Set cmdResult = Server.CreateObject("ADODB.Command")
cmdResult.CommandType = adCmdStoredProc
cmdResult.CommandText = "sp_Practitioner13"
cmdResult.ActiveConnection = cnToronto

Set rs = Server.CreateObject("ADODB.Recordset")
rs.CursorLocation = 3
rs.CursorType = 3
rs.Open = cmdResult

if rs.EOF then  <- The error occurs at this line
...

I have this error message:
ADODB.Recordset (0x800A0E78)
Operation is not allowed when the object is closed.

Any help would be very appreciated!
Thanks
Catherine


  Return to Index