Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SP with multiple tables and databases (insert & delete)
Message
 
 
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
00758108
Message ID:
00759746
Views:
26
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform