Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SP with multiple tables and databases (insert & delete)
Message
From
28/02/2003 17:50:26
 
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
00758108
Message ID:
00759754
Views:
12
Can you post your final code?

-Mike

>>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.
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform