BUG: Msg 16916 and AV If Cursor Is Declared but Not OpenedID: Q171101
|
If a cursor is declared and deallocated, but not opened on the first
execution of a stored procedure or trigger, the next execution of the
stored procedure or trigger where the cursor is opened results in the
following error:
Msg 16916, Level 16, State 1
A cursor with the name '<cursor>' does not exist
To work around this problem, open the cursor before deallocating it.
Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.5. This problem does not occur in U.S. Service Pack 2 for Microsoft SQL Server version 6.5. For more information, contact your primary support provider.
If you try to drop the stored procedure after the handled access violation,
you will encounter the following error message:
Msg 3702, Level 16, State 3 Cannot drop the procedure '<procedure>'
because it is currently in use.
You must restart SQL Server to drop and re-create the procedure.
Keywords : kbusage SSrvTran_SQL kbbug6.50
Version : 6.5
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: April 20, 1999