Subject | Re: [IBO] TIB_Connection Losing Connection. PLEASE HELP |
---|---|
Author | Infocare Developer |
Post date | 2002-11-04T08:47:57Z |
yes i see that, this is actually not the real code as you see i was typing
it in and not using copy - paste, but yes that is not the way it is
actually.
it in and not using copy - paste, but yes that is not the way it is
actually.
----- Original Message -----
From: "Heri" <heribender@...>
To: <IBObjects@yahoogroups.com>
Sent: Sunday, November 03, 2002 10:19 PM
Subject: Re: [IBO] TIB_Connection Losing Connection. PLEASE HELP
> > All our query components start transactions as follows:
> >
> > if not qryXX.IB_Transaction.InTransaction then
> > qryXX.IB_Transaction.StartTransaction;
> > if not qryXX.IB_Transaction.Started then
> > qryXX.IB_Transaction.Started := true;
> > try
> > try
> > qryXX.Open;
> > finally
> > qryXX.IB_Transaction.Commit;
> > end;
> > except
> > try
> > qryXX.IB_Transaction.Rollback;
> > except
> > end;
> > raise;
> > end;
>
> I wonder why you enclose the commit statement within a try..finally block.
> Like this, any exception which comes up after the open statement (I assume
> you have some statements there), will cause first to commit (in the
finally
> part) then rollback (in the except part), which I believe cannot be
healthy.
>
> Heri
>
>
>
>
___________________________________________________________________________
> 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 http://docs.yahoo.com/info/terms/
>
>