Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SP with multiple tables and databases (insert & delete)
Message
 
 
À
28/02/2003 17:35:43
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
00758108
Message ID:
00759746
Vues:
21
>I'm a fan of using GOTO to make error handling easier:
>
>
>DECLARE @err int
>
>UPDATE cart SET .....
>
>SET @err = @@ERROR
>IF @err != 0 GOTO __cleanup
>
>UPDATE nextTable SET ...
>
>SET @err = @@ERROR
>IF @err != 0 GOTO __cleanup
>
>__cleanup:
>IF @err != 0
>BEGIN
> -- cleanup code goes here
>END
>
>
>
>or something like that
>
>-Mike
Nice tip!

Anyway, why my result is not printed??????
declare @tnCartID int, @RetStat int 

EXECUTE @RetStat = USP_Insert_ShoppingCartInfo 
	'11111111111'  ,
        5 ,
        'Test' 	,
        'B' ,
	'Test selection' ,
        '1,2,3' ,
        @tnCartID OUTPUT

print @tnCartID
All I see is 1 row affected, 1 row affected.
I've checked the data, inserts were fine.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform