Subject Re: Firebird function to test if a database connection is not disconnected?
Author jeff_j_dunlap
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
> At 10:44 AM 14/05/2009, you wrote:
>
> Sending some economical ad hoc query and interpreting
> the returned error status buffer *is* the way for the
> client to determine whether its database handle is still
> alive. "SELECT 1 FROM RDB$DATABASE" is as good as any.
> If the connection is still alive, you get 1, if it's gone,
> you get an exception.

Thank you so much Helen. I was looking for something economical and generic that could be used to test the connection state.

SELECT 1 FROM RDB$DATABASE is absolutely perfect!

Best regards,

Jeff