Board index » delphi » rollback in the trigger

rollback in the trigger

When a trigger raise erro and have a "rollback transaction" statement for to
cancel operation (data integrity), roll back all after begin transaction (in
code delphi),
even so, delphi DB_SqlSisd.InTransaction=true and with DB_SqlSisd.RollBack
raise erro 3903 "The ROLLBACK TRANSACTION request has no corresponding BEGIN
TRANSACTION"

Airton

 

Re:rollback in the trigger


Hi airton!

On Mon, 17 Jan 2000 12:28:54 -0400, "airton" <air...@mailcity.com>
wrote:

Quote
>When a trigger raise erro and have a "rollback transaction" statement for to
>cancel operation (data integrity), roll back all after begin transaction (in
>code delphi),
>even so, delphi DB_SqlSisd.InTransaction=true and with DB_SqlSisd.RollBack
>raise erro 3903 "The ROLLBACK TRANSACTION request has no corresponding BEGIN
>TRANSACTION"

If you started transaction from Delphi app than you can as well commit
or rollback from there. That is the practice I always follow. Finish
your trigger with a raiserror statement and catch that in delphi and
do a rollback on Exception and commit otherwise.

tomi.

Re:rollback in the trigger


Thank you Tomi.

Other Threads