Subject | Re: [IBO] TIB_Connection Losing Connection. PLEASE HELP |
---|---|
Author | Infocare Developer |
Post date | 2002-10-30T11:51:49Z |
Ok i have tried calling CloseTransactions
and also i loop through Transactions[i].CancelAll;
but then when i call IB_Connection.Connected := False;
it still raises the exception "error writing data to the connection"
what is it trying to write?
did you not say that it is up to the application to set the state of
connected, why does it not allow me?
and also i loop through Transactions[i].CancelAll;
but then when i call IB_Connection.Connected := False;
it still raises the exception "error writing data to the connection"
what is it trying to write?
did you not say that it is up to the application to set the state of
connected, why does it not allow me?
----- Original Message -----
From: "Helen Borrie" <helebor@...>
To: <IBObjects@yahoogroups.com>
Sent: Wednesday, October 30, 2002 12:46 PM
Subject: Re: [IBO] TIB_Connection Losing Connection. PLEASE HELP
> At 11:45 AM 30-10-02 +0200, you wrote:
> >ok i have narrowed it down a bit, this is what i have discovered,
> >I have simulated the problem by starting the server and then killing the
> >connections from another app.
> >
> >VerifiyConnection tells me if the connection is ok,
> >when this is false i can set Connected to false and connected to True, so
> >the reconnect works fine,
> >
> >But as soon as I run any queries against the server I see that there are
> >some transactions linked to the TIB_Connection, and after that It cannot
> >reconnect any more the exception is "Error writing to the connection"
> >
> >Now i assume i have to somehow cancel all the transactions before trying
the
> >reconnect, I have tried
> >
> >ForceDisconnect - This still raises the exception and does not disconnect
> >I have tried CloseTransactions before calling forcedisconnect, still no
luck
>
>
> >So how can i simply cancel the transactions linked to it without the
> >component trying to "write to the connection" upon reconnect?
>
> Have you tried doing what (I believe) ib_connection does itself in
> preparation for a controlled Disconnect, viz.
>
> iterate through the Transactions[] array of the IB_Connection and kill
> everything by calling Close on each..as all of your transactions are set
up
> for explicit control, it should roll back every one.
>
> AFAIK, CloseTransactions actually does this itself so it's not necessarily
> going to be helpful.
>
> The fact that this is an intermittent problem still tells me it's in the
> network, either physical (horrendous to troubleshoot) or in other areas
> like connection strings, possibly IB events maxing out some kind of
> connection limit, or just rotten old NetBEUI if that's your network
protocol.
>
> Helen
>
>
>
>
>
>
>
>
___________________________________________________________________________
> 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/
>
>