Subject RE: [IBO] How to get TIB_Transaction from IBOTable object?
Author Jason Wharton
The Started property reveals the physical transaction (based on if a
transaction handle is present) and has nothing to do with the explicit
transaction (based on application behavior the programmer controls) that is
started with the call to StartTransaction method.

This is what you check for the presence of an explicit transaction:

if not MyTable.IB_Transaction.InTransaction then
MyTable.IB_Transaction.StartTransaction;


Jason
(still out of town)

> -----Original Message-----
> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]On
> Behalf Of Helen Borrie
> Sent: Wednesday, May 04, 2005 8:32 AM
> To: IBObjects@yahoogroups.com
> Subject: Re: [IBO] How to get TIB_Transaction from IBOTable object?
>
>
> At 04:54 PM 4/05/2005 +0200, you wrote:
> >I've got an IBOTable with <default> IB_Transaction and
> >DatabaseName='mydatabase'. How do I get TIB_Transaction
> object used by
> >this IBOTable? I want certain piece of code to wark in all
> >circumstances, so I cannot asume that 'mydatabase' is known...
>
> Refer to the IB_Transaction property of the IBOTable object.
>
> e.g.
>
> if not MyTable.IB_Transaction.Started then
> MyTable.IB_Transaction.StartTransaction;
>
> Helen