Subject | Re: Firebird function to test if a database connection is not disconnected? |
---|---|
Author | jeff_j_dunlap |
Post date | 2009-05-14T02:41:06Z |
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@...> wrote:
SELECT 1 FROM RDB$DATABASE is absolutely perfect!
Best regards,
Jeff
>Thank you so much Helen. I was looking for something economical and generic that could be used to test the connection state.
> 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.
SELECT 1 FROM RDB$DATABASE is absolutely perfect!
Best regards,
Jeff