Subject | Re: [IBO] Sorry, but I got lost again (about transaction) |
---|---|
Author | James Chua |
Post date | 2003-12-05T07:53:34Z |
Thanks a lot helen. You have provided a knowledge, share your practices
... it give a lot of ideas in doing things easily for me and organily.
Thanks jason. Since using the internal transaction is not advisable I
guess dropping another ib_transaction component will be my solution as
you both guys suggest it.
Cheers
James
Helen Borrie wrote:
... it give a lot of ideas in doing things easily for me and organily.
Thanks jason. Since using the internal transaction is not advisable I
guess dropping another ib_transaction component will be my solution as
you both guys suggest it.
Cheers
James
Helen Borrie wrote:
> At 08:57 AM 5/12/2003 +0800, you wrote:
> >Sorry for my lack of knowledge.
> >
> >My question is what if I want to use the internal transaction that you
> >are mentioning of each dataset set. How and where will I be able to
> >change some of it's properties like the Isolation to Read Committed?
> >Like in then TIB_transaction component we can set it's Isolation
> property?
>
> The dataset uses the connection's <DefaultTransaction>. If the
> connection
> is using an explicit transaction instead of the DefaultTransaction, then
> the dataset uses that. To access it from the the dataset, refer to the
> dataset's IB_Transaction property.
>
> e.g. MyDataset.IB_Transaction.Isolation := ReadCommitted;
>
> You will get an error if you try to do that whilst the transaction is
> in a
> Started state. And don't forget that anything you do at that level will
> affect *all* datasets in the transaction, not just that one.
>
> The *right* way with IBO (IMO) is not to use the <DefaultTransaction> at
> all. Always have at least one explicit transaction. If you need
> more, add
> more. And, in the datasets, always explicitly set the IB_Transaction
> property to be the one you want.
>
> I typically have a minimum of two transactions attached to any connection
> object. One is used for scrolling datasets and their embedded DML. The
> other is used for one-off loading of ib_cursor sets into non-data-aware
> components or controls (stringlists, listboxes and the like). I
> implement
> methods to do that, which are called at the datamodule's FormCreate and,
> during a client session, any time the non-data-aware objects need to be
> refreshed.
>
> If I do an interface that uses read-only datasets for things like
> selector
> boxes, then I have a third transaction, read-only, ReadCommitted, for
> those.
>
> Helen
>
>
>
> *Yahoo! Groups Sponsor*
> ADVERTISEMENT
> <http://rd.yahoo.com/SIG=12ci4mrnf/M=267637.4116732.5333197.1261774/D=egroupweb/S=1705007183:HM/EXP=1070675444/A=1853618/R=0/*http://www.netflix.com/Default?mqso=60178338&partid=4116732>
>
>
>
> ___________________________________________________________________________
> 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 the Yahoo! Terms of Service
> <http://docs.yahoo.com/info/terms/>.