Operation is not allowed when the object is closed 
Author Message
 Operation is not allowed when the object is closed

I have a Stored Proc in SQL 7.0 I have SET NOCOUNT ON at the beginning of
the proc and SET NOCOUNT OFF at the end of the proc. The proc selects
reocrds in to a temp table and then returns them to a recordset when the
command is executed. I then drop the temp table. I can exec the proc in the
Analyzer but when i execute the command in vb i get and error in the
recordset say "Operation is not allowed when the object is closed".

Does anyone have any ideas.

Thanks Tim.



Sat, 23 Oct 2004 23:11:34 GMT  
 Operation is not allowed when the object is closed
Post your code...Sounds like you havent opened the Recordset or accidently
Closed it/

--
Veign
www.veign.com
Code Samples & Sample Projects
http://www.veign.com/information/application/info_app.html
Submit Your Best Code (you keep the rights)
http://www.veign.com/information/application/code_submit.html
---------

Quote:
> I have a Stored Proc in SQL 7.0 I have SET NOCOUNT ON at the beginning of
> the proc and SET NOCOUNT OFF at the end of the proc. The proc selects
> reocrds in to a temp table and then returns them to a recordset when the
> command is executed. I then drop the temp table. I can exec the proc in
the
> Analyzer but when i execute the command in vb i get and error in the
> recordset say "Operation is not allowed when the object is closed".

> Does anyone have any ideas.

> Thanks Tim.



Sat, 23 Oct 2004 23:18:26 GMT  
 Operation is not allowed when the object is closed
'Man Data is a Global Variable

Dim M_ADO_RECORDSET         As ADODB.Recordset
Dim M_ADO_COMMAND           As ADODB.Command

    Set M_ADO_RECORDSET = New ADODB.Recordset
    Set M_ADO_COMMAND = New ADODB.Command

        With M_ADO_COMMAND

            .ActiveConnection = ManData
            .CommandText = "usp_Doses_Date_Top_Cross"
            .CommandType = adCmdStoredProc


adParamInput, , "01/02/2000")

adParamInput, , "01/01/2003")

            Set M_ADO_RECORDSET = M_ADO_COMMAND.Execute

            'Will do something here.

        End With

    Set M_ADO_COMMAND = Nothing
    Set M_ADO_RECORDSET = Nothing


Quote:
> Post your code...Sounds like you havent opened the Recordset or accidently
> Closed it/

> --
> Veign
> www.veign.com
> Code Samples & Sample Projects
> http://www.veign.com/information/application/info_app.html
> Submit Your Best Code (you keep the rights)
> http://www.veign.com/information/application/code_submit.html
> ---------


> > I have a Stored Proc in SQL 7.0 I have SET NOCOUNT ON at the beginning
of
> > the proc and SET NOCOUNT OFF at the end of the proc. The proc selects
> > reocrds in to a temp table and then returns them to a recordset when the
> > command is executed. I then drop the temp table. I can exec the proc in
> the
> > Analyzer but when i execute the command in vb i get and error in the
> > recordset say "Operation is not allowed when the object is closed".

> > Does anyone have any ideas.

> > Thanks Tim.



Sat, 23 Oct 2004 23:30:08 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Operation is not allowed when the object is closed

2. Operation is not allowed when the object is closed

3. Operation is not allowed when the object is closed and CommanTimeout,

4. Operation is not allowed when the object is closed

5. operation is not allowed when the object is closed

6. Stored Proc problems - Operation not allowed when the object is closed

7. Operation is not allowed when the object is closed - error

8. operation not allowed when object is closed

9. '3709': Operation is not allowed on an object referencing a closed or invalid connection

10. I am trying to update a record, i am not using data control

11. I am trying to update a record, i am not using data control

12. I am learning VB.NET and am wondering....

 

 
Powered by phpBB® Forum Software