Subject | Re: [firebird-support] Re: How to identify database created by Firebird 1.5 or Interbase 6.5? |
---|---|
Author | emel.hu |
Post date | 2004-10-07T08:37:36Z |
>>Thanks for the reply. If I follow your instruction, I can identityGet database version string.
>>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?
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