Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Could not complete cursor operation
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01385994
Message ID:
01385998
Vues:
20
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform