Subject RE: [IBO] How to get TIB_Transaction from IBOTable object?
Author Jason Wharton
If it is NULL then obviously there isn't a transaction yet. If you are
relying upon a TIBOTable to have its own internal transaction then you
should be poking around with it and instead you should actually define a
transaction object for it and control it explicitly. It's fine if you
access it via the TIBOTable object, I just recommend you control a dedicated
transaction object.


> -----Original Message-----
> From: []On
> Behalf Of Robert Osowiecki
> Sent: Thursday, May 05, 2005 2:46 AM
> To:
> Subject: Re: [IBO] How to get TIB_Transaction from IBOTable object?
> Helen Borrie wrote:
> >>Have you actually tried that? In C++ Builder IB_Transaction
> returns NULL
> >>when
> >>default transaction is used...
> >>
> >>
> >
> >That is quite likely, since the default transaction is
> created when it is
> >needed and simply may not be available at the time you refer to it.
> >
> >If you are using TIBODatabase, there is one transaction
> built in and you
> >refer to it through properrties of the IBODatabase object.
> >
> That's what I'm doing now: I refer to MyDatabase->IB_Transaction.
> >Also set the IB_Connection property of your IBOTable - then
> IBO will take
> >care of the DatabaseName property, and you will not get the
> situation where
> >the TIBOTable creates its own internal transaction.
> >
> >
> I'm not sure that I understand everything... what if
> DatabaseName is set
> and IB_Connection not?
> Then IBO looks for correspodning IB_Connection or IBODatabase
> component
> and uses its default
> transaction, does't it? I wonder if there is some "GetDatabaseByName"
> function in IBO: It would be
> a great help for me if I could locate the transaction starting from
> TIBOTable object.
> Thanks a lot!
> Robson.