Subject Re: [IBO] TIB_Connection Losing Connection, more problems
Author Jason Wharton
You should not do anything with a connection while it is already in the
process of processing a statement. This is violating the thread-safety
requirements of the client API.

VerifyConnection just does a database info request. If it fails then it
returns false.

Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com

-- We may not have it all together --
-- But together we have it all --


----- Original Message -----
From: "Infocare Developer" <dev@...>
To: <IBObjects@yahoogroups.com>
Sent: Monday, November 04, 2002 1:57 AM
Subject: [IBO] TIB_Connection Losing Connection, more problems


> Still on this same issue i have not btw solved the previous issue, if you
> will recall, i have found it merely impossible to reconnect an ibo
> connection once it is lost, even after cancelling and closing all
> transactions, the ibo connection still wants to write something to the
> connection on close, not even forcedisconnect works, or Connected :=
false.
> I have even tried to Free the IBO Connection Components and replacing them
> with new instances, this works but causes memory leaks with the IBO
> connection components not freeing since it raises an exception on destroy
> trying to "write" to the connection, not a clean solution
>
> so the only alternative was to periodiacally check the connection by
calling
> VerifyConnection, If this fails it waits 1 sec and then retries another 2
> times, if it does not verify all 3 times, the server's process is
terminated
> and restarts itself, this seemed to work, but
>
> Whenever quite a few queries are run the server seems to keep restarting,
> it's as if verifyconnection does not work if something is busy with the
> connection.
>
> What does veryifyconnection do? and how reliable is it? and if a query is
> busy running over the connection and data is being received or something,
> will verifyconnection return false?
>
> ----- 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/
> >
> >
>
>
>
>
___________________________________________________________________________
> 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/
>
>
>