Subject | Re: [firebird-support] Store Procedure for updating data, why it is need to commit? |
---|---|
Author | Helen Borrie |
Post date | 2014-04-29T07:18:34Z |
At 05:23 p.m. 29/04/2014, trskopo@... wrote:
start transaction
do some selects
do some deletes
run a stored procedure
do some more stuff
commit transaction
Helen Borrie, Support Consultant, IBPhoenix (Pacific)
Author of "The Firebird Book" and "The Firebird Book Second Edition"
http://www.firebird-books.net
__________________________________________________________________
>When I run that procedure on flamerobin with this command:Everything you do in Firebird happens in a transaction context, e.g.,
>
>execute procedure Reg.
>
>
>It runs ok, but without a commit command, the field1 on table won't get update.
>
>I rarely use store procedure to do update / insert / delete, but is this a normal behavior?
start transaction
do some selects
do some deletes
run a stored procedure
do some more stuff
commit transaction
>Is there any commands to add so commit is no needed?No. The work done by the transaction remains isolated until COMMIT is called. If the transaction is not committed, the database state does not change.
Helen Borrie, Support Consultant, IBPhoenix (Pacific)
Author of "The Firebird Book" and "The Firebird Book Second Edition"
http://www.firebird-books.net
__________________________________________________________________