问题描述:

Exist any Way to Determine the Version of Firebird SQL is running? using SQL or code (delphi, C++).

Bye

网友答案:

If you want to find it via SQL you can use get_context to find the engine version it with the following:

SELECT rdb$get_context('SYSTEM', 'ENGINE_VERSION') 
             as version from rdb$database;

you can read more about it here firebird faq, but it requires Firebird 2.1 I believe.

网友答案:

Two things you can do:

  • Use the Services API to query the server version, the call is isc_service_query() with the isc_info_svc_server_version parameter. Your preferred Delphi component set should surface a method to wrap this API.
    For C++ there is for example IBPP which has IBPP::Service::GetVersion() to return the version string.
    What you get back with these is the same string that is shown in the control panel applet.

  • If you need to check whether certain features are available it may be enough (or even better) to execute statements against the system tables to check whether a given system relation or some field in that relation is available. If the ODS of the database is from an older version some features may not be supported, even though the server version is recent enough.
    The ODS version can also be queried via the API, use the isc_database_info() call.

网友答案:

May be you have FIBPlus ( http://www.devrace.com/en/fibplus/ ) ... it has all the tools and sources necessary to install, uninstall, start, stop Firebird/Interbase and also to get the version of the server and more. In any case, you can get the version from the client driver (fbclient.dll for Firebird). DelphiDabbler ( http://www.delphidabbler.com/software/verinfo/download ) has free sources that get file version of any DLL. You can easily use that.

相关阅读:
Top