You should really not use cursors, and if you do use them you should also know if it's open or closed. But if you really have to, use CURSOR_STATUS:CREATE TABLE #TMP( ii int)GOINSERT INTO #TMP(ii) VALUES(1)INSERT INTO #TMP(ii) VALUES(2)INSERT INTO #TMP(ii) VALUES(3)GO--Create a cursor.DECLARE cur CURSORFOR SELECT * FROM #TMP--Display the status of the cursor before and after opening--closing the cursor.SELECT CURSOR_STATUS('global','cur') AS 'After declare'OPEN curSELECT CURSOR_STATUS('global','cur') AS 'After Open'CLOSE curSELECT CURSOR_STATUS('global','cur') AS 'After Close'--Remove the cursor.DEALLOCATE cur--Drop the table.DROP TABLE #TMP- LumbagoIf the facts don't fit the theory, change the facts. Albert Einstein