|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
@@ERROR not working
I wrote a store procedure like the following
create procedure....as begin declare @e int select @e = 0 begin trans insert..... if @@ERROR<>0 begin @e = @@ERROR print "...." end if @@ERROR<>0 begin @e = @@ERROR print "...." end if @e=0 then commit transaction else rollback transaction return 0 it is not working....when any error (especially wrong table name)...it is raising an error and no commit or rollback getting executed in the second statement....no other setting is made apart from the above code. |
|
#2
|
|||
|
|||
|
the value of @@error is set after each statement (including if)
|
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > @@ERROR not working |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|