Bill Crawley
May 22nd, 2009, 05:27 AM
Hi All,
I have a cursor in a try catch block of SQLServer 2005.
At the end of the try block as long as it doesn't error, I close and deallocate the cursor.
However, should it fail and drop into the catch block there is a possibility that the cursor is still open.
In my catch block, how can I test for the existance of the cursor so that if it exist's I can close and deallocate it.
I have a cursor in a try catch block of SQLServer 2005.
At the end of the try block as long as it doesn't error, I close and deallocate the cursor.
However, should it fail and drop into the catch block there is a possibility that the cursor is still open.
In my catch block, how can I test for the existance of the cursor so that if it exist's I can close and deallocate it.