Operation is not allowed when Object is Closed

  • BrianBurkill

    Valued Member

    Points: 67

    The reason for this is because you are returning results from a temporary table. And when the procedure completes, the #temporary table goes out of scope. 

    So when your vb app tries to navigate the returned recordset, it is closed due to the temporary table not being there anymore.

    On earlier versions of SQLServer, this didnt appear to be an issue. We are experiencing the same thing following an upgrade of SqlServer, whereby reports are now failing.

    The fix is as per the previous post. Adding "SET NOCOUNT ON;" at the top of the stored procedure seems to remove the problem.

Viewing post 16 (of 16 total)

You must be logged in to reply to this topic. Login to reply