Subject | Re: [firebird-support] Re: server version |
---|---|
Author | Paul Vinkenoog |
Post date | 2013-02-04T00:25:03Z |
Hi Wolfgang,
Cheers,
Paul Vinkenoog
> I am usingThat works - if the difference between 1.0 and 1.5.6 doesn't matter to you - but the OP wanted a solution that didn't require opening a database connection first (and as we now know, he needs it for JDBC).
>
> Try
>
> Qry.Close;
> Qry.SQL.Text := 'select rdb$get_context(''SYSTEM'',
> ''ENGINE_VERSION'') cVer from rdb$database'; // fails on engine version < 2
> Qry.ExecQuery;
> cEngineVer := Qry.FieldByName( 'cVer' ).AsString;
> Qry.Close;
> Except
> cEngineVer := '1.5.6'; // default if engine version >=2 cannot be
> verified
> End;
Cheers,
Paul Vinkenoog