Subject | Re: [firebird-support] Re: Firebird function to test if a database connection is not disconnected? |
---|---|
Author | Dimitry Sibiryakov |
Post date | 2009-05-14T18:29:06Z |
> Can you tell me what is the easiest way to call the functionThe easiest way is... just to call it. Here is piece of code:
bool IB_Connected(isc_db_handle& Handle)
{
if (Handle != NULL)
{
ISC_STATUS_ARRAY status_array;
char request_buffer = isc_info_implementation;
char result_buffer[10];
if (isc_database_info(status_array, &Handle, 1, &request_buffer,
sizeof(result_buffer), result_buffer))
{
Handle = NULL;
}
else
return true;
}
return false;
}
SY, SD.