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
> > How the default transaction works? I want no start a transaction when I
> > 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
> > is close I want to make a commit. How I do this? Exist any automatic
> > for this steps or I must to include all this codes in the my
> > 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
> without the need for BDE, ODBC or any other layer.
> - your IBO community resource for Tech Info
> keyword-searchable FAQ, community code contributions and more !
> Your use of Yahoo! Groups is subject to