Subject RE: [IBO] Connection lost question
Author IBO Support List
Dany,

Yes, I made that change a part of the code base and it will continue to be
included since I cannot conceive of any way that it could harm anything.

Thanks,
Jason

-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf
Of DanyM
Sent: 25 January 2012 04:11 AM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] Connection lost question

Hello!

My apologies for leaving this hanging for so long. I've tried the change.
After implementing it I it works better. I can not be 100% conclusive as
yet, because other things got in the way.

This is implemented already in builds after 36d, yes? I'll run the test with
a later build too (I'm on 36d).

Regards,

/Dany

--- In IBObjects@yahoogroups.com, "IBO Support List" <supportlist@...>
wrote:
>
> Dany,
>
> You might want to try this modification to see how things go:
>
> procedure TIB_Transaction.API_Start;
> ...
> while ( errcode = isc_conn_lost ) and ( ticks > GetTickCount ) do
> errcode := isc_start_multiple( @status,
> PtrHandle,
> ConnectionCount,
> pteb );
> if errcode <> 0 then
> begin
> CheckLostConnection; // Added in this line of code.
> HandleException( Self );
> end;
> ...
>
> Jason
>
>
> -----Original Message-----
> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On
Behalf
> Of DanyM
> Sent: 18 January 2012 07:22 AM
> To: IBObjects@yahoogroups.com
> Subject: [IBO] Connection lost question
>
> Hello!
>
> I have an error handler for the query and for the transaction. In this
> handler I do
>
> if ConnectionLostErrcode( ERRCODE ) then begin
> ConnectionDataModule.ConnectionLost;
> RaiseException := false;
> Abort;
> end;
>
> the ConnectionDataModule then calls an event handler in the GUI part that
> sends a windows message to the main form. The main form throws up a
> messagebox asking if we should try to reconnect.
>
> My problem is that in the cases where the TIB_Transaction raised the
> exception there will often be another lost connection exception
immediately
> after. At least when the first one came from an API_Start there will be
> another one from a following call to API_Committ.
>
> How do I determine that I already handled one lost connection exception
and
> that the following ones are just the following ones?
>
> TIA,
>
> /Dany