Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Could not complete cursor operation error 16958

Status
Not open for further replies.

mamartin

Programmer
Aug 10, 2001
75
US
A stored procedure that is called/executed from a SQL Server Agent job continues to fail with the following error message: "could not complete cursor operation because the set options have changed since the cursor was declared. [SQLSTATE 42000] (Error 16958)." This is on SQL Server 2000. The same stored procedure executed without a problem under SQL Server 7.0. The stored procedure is called to purge rows out of a table. The interesting thing is that the job only fails when there are 0 rows in the table. If there are rows in this table (even if none match the purge criteria), then the job completes successfully. I have searched the net for this error message, and had some hits, but nothing concrete. Hope someone can help.

Thanks,
Michael A. Martin
 
Unfortunately, no, I cannot post the code for the stored procedure. It is proprietary code and not my property. I was just hoping that someone ran into the message before and had a solution I could try.

Thank you,
Michael A. Martin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top