Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Could not complete cursor operation
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01385994
Message ID:
01385998
Views:
21
I found http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_21209809.html could it be related?

>Could not complete cursor operation because the table schema changed after the cursor was declared.
>Any Ideas on how to fix?
>
>CODE SPROC1:
>
>
>Create Procedure SPROC1
>
>@PrimeMasterFLID	int
>
>as
>
>
>INSERT INTO MasterOptionFL (MasterFLID) VALUES(@PrimeMasterFLID)
>
>		
>EXEC SPROC2 @PrimeMasterFLID
>
>go
>
>
>
>CODE SPROC2:
>
>
>Create Procedure SPROC2
>
>@PrimeMasterFLID	int
>
>as
>
>declare TempAlternates cursor
>for 
>	Select *
>	From MasterOptionFL with (nolock) 
>	Where MasterOptionFL.MasterFLID = @PrimeMasterFLID
>
>open TempAlternates
>
>FETCH NEXT FROM TempAlternates INTO @Field1,@Field2,@Field3
>WHILE (@@FETCH_STATUS <> -1) 
>BEGIN
>   IF (@@FETCH_STATUS <> -2)
>   BEGIN		
>	&&MISCELLANEOUS CODE
>   END
>	FETCH NEXT FROM TempAlternates INTO @Field1,@Field2,@Field3
>END
>
>CLOSE TempAlternates
>DEALLOCATE TempAlternates
>
>go
>
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform