Ways to Determine the Version of Firebird SQL?

做~自己de王妃 提交于 2019-12-07 03:10:19

问题


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

Bye


回答1:


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.




回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/1248079/ways-to-determine-the-version-of-firebird-sql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!