Subject RE: [IBO] Testing for Transaction running
Author Alan McDonald
I have this method too but occasionally (very infrequently), users get a
transaction already started exception. which kind of says to me that the
help docs on Started is correct i.e. it may or may not return true or false,
and there appears no way to relying on it 100% unless I use a try block to
start it.
Alan

> -----Original Message-----
> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]On
> Behalf Of Woody
> Sent: Friday, 20 April 2007 2:07 PM
> To: IBObjects@yahoogroups.com
> Subject: Re: [IBO] Testing for Transaction running
>
>
> From: "Alan McDonald" <alan@...>
> >I want to test if a transaction is started/running and if not, start it
> > explicitly. So I want to test if it's running.
>
> I always use this test:
>
> if not (Started or InTransaction) then
> StartTransaction;
>
> It works no matter how the transaction was started. At least, so far...
>
> Woody (TMW)
>
>
> __________________________________________________________________
> _________
> 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 !
>
> Yahoo! Groups Links
>
>
>
>