Subject Re: [IBO] Dealing with connection loss
Author Robert Martin
Hi

I have built a small test application and the process below does work.
However I do close and reopen the query (TIBOQuery) and locate the key
of the previous display. While that works and is probably acceptable, I
just wonder if there is a way to restore function without doing that. I
note that the query data stays on available / on screen after the
connection is lost.

Thanks
Rob

On 10/07/2017 11:37 AM, Robert Martin rob@... [IBObjects] wrote:
> Hi
>
> We have a small app that displays a grid of data using IBO components.
> When laptop users disconnect from their base station and therefore move
> from a wired Lan to a WIFI netork the Firebird connection is broken.
> What is the recommended / best way to gracefully handle this situation
> and seamlessly return to normal?
>
> I had though something like the following
>
> 1. Detect disconnect by trapping exception or AfterDisconnect event
>
> 2. Loop attempting to reconnect for a specified period (30seconds ?)
>
> 3. If reconnect successful, reopen all queries using the last SQL and
> settings. I would like to show the same records if they have scrolled
> through the grid but I am aware this might not be possible.
>
> 4. If reconnect unsuccessful show message and allow for close or retry.
>
> What do people think?
>
>
> Thanks
> Rob
>
>
>
>
> -