If you get this error then it means you are using global cursor that will be defined each time you are calling this procedure and give you the same error.
Define a local cursor. Just put the keyword LOCAL after CURSOR:
DECLARE MyCursor CURSOR LOCAL FOR ...
Date and Time Conversions in SQL Server
How to solve "TableAdapter can't see stored procedure returned fields when using temp table" problem
Search text in all stored procedures in SQL Server
Drop all the tables, stored procedures, triggers, constraints and all the dependencies in one sql st...
How to find the first missing value in a series in MS SQL