Subject Re: [firebird-support] Re: How to identify database created by Firebird 1.5 or Interbase 6.5?
Author emel.hu
>>Thanks for the reply. If I follow your instruction, I can identity
>>if it is FB 1.5 database or FB 1.03 database.
>>
>>But my problem is how to identity FB 1.5 database and Interbase 6.5
>>database since both database has same ODS 10.1. Do you mean the
>>Interbase 6.5 don't have the indices you mentioned?

Get database version string.
If contain "Firebird" substring...

BCB sample code:

AnsiString __fastcall TeMeL_IBDatabase::GetServerVersion(void)
{
if (ServerVersion_.IsEmpty())
{
TIBDatabaseInfo * dbiX = NULL;

try
{
dbiX = new TIBDatabaseInfo(this);

dbiX->Database = this;

ServerVersion_ = dbiX->Version;
}
catch (Exception &E)
{
ShowMessage("Az adatbázis-server verzió adatainak kiolvasása
sikertelen\n\n" + E.Message);
}

delete dbiX;
}

return ServerVersion_;
}
//---------------------------------------------------------------------------

bool __fastcall TeMeL_IBDatabase::isFirebirdServer(void)
{
int iPos = UpperCase(ServerVersion).Pos("FIREBIRD");

return (iPos > 0);
}
//---------------------------------------------------------------------------


eMeL