Subject Re: [IBO] default transaction
Author Ronaldo Rezende Vilela Luiz
Internally, if I use the default transaction, a commitRetaining is applyed
on any change? Then, what I only must to do is set a open dataset in the
oncreate and close the dataset in the onclose event? When I use a default
transaction, is created one transaction to each ib_query component that I
use? Is there any disadvantage if I use the default transaction instead I
put one component to each dataset in the datamodule?
....
<lester@...> escreveu na mensagem
news:3CA16C97.AB95363A@......
> > How the default transaction works? I want no start a transaction when I
open
> > a dataset (when the form is created), and each change in the database
> > (inserts, updates, deletes) I want to do a commitretaining and when the
form
> > is close I want to make a commit. How I do this? Exist any automatic
metod
> > for this steps or I must to include all this codes in the my
application's
> > events afterinsert, afterpost, afterdelete, afterupdate ?
>
> ------
> If you simply want to save each change, then the default
> transaction will work in the background.
> CommitRetaining will save without loosing your position. It
> does exactly the same job as Commit so you do not need an
> additional Commit at the end.
>
> ------
> If you want more control, to allow you to group a set of
> changes then :-
>
> Just add your own transaction.
> When you open the form - do a transaction->StartTransaction.
> Make all your changes.
>
> Then do a Commit ( or Rollback )
>
> DO NOT use CommitRetaining if you want to be able to
> RollBack a set of changes.
>
> --
> Lester Caine
> -----------------------------
> L.S.Caine Electronic Services
>
>
>
___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
InterBase
> without the need for BDE, ODBC or any other layer.
>
___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
papers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>