Page 1 of 1

How to determine database driver version?

Posted: Tue 20 Mar 2012 18:05
by ralfiii
Hello!

Is there a way to determine the version of the installed database driver using IbDac?
In my old code I've read the version from the registry under
HKLM\Software\Firebird Project\Firebird Server\Instances
but this makes troubles as you might have a 64bit Windows with 64 or 32 bit drivers...

I tried using TIbcVersionInfo but

Code: Select all

     with TIbcVersionInfo.Create do
     begin
          ShowMessage('>'+ServerVersion+''+.ServerImplementation+''+Inttostr(ver.ServiceVersion)+'<');
     end;
doesn't give anything but empty strings.

Thanks,
Ralf S.

Posted: Wed 21 Mar 2012 07:12
by AndreyZ
Hello,

To obtain server version, you can use either TIBCConnection or TIBCServerProperties. Here are code examples demonstrating both ways:

Code: Select all

IBCConnection.Open;
if IBCConnection.DatabaseInfo.FBVersion  '' then
  ShowMessage(IBCConnection.DatabaseInfo.FBVersion)
else
  ShowMessage(IBCConnection.DatabaseInfo.Version);

Code: Select all

IBCServerProperties.Attach;
IBCServerProperties.FetchVersionInfo;
ShowMessage(IBCServerProperties.VersionInfo.ServerVersion);

Posted: Wed 21 Mar 2012 09:04
by ralfiii
That generally works fine, but this way I only see the version of the server.

If I connect from a client PC to the server I'd also like to know which version the driver on the client PC has.
(Let's say the server uses FB2.5 and the client FB2.1.3 then this may explain certain problems the software has during operation)

Can this be done with IBC?

Posted: Wed 21 Mar 2012 14:02
by AndreyZ
To obtain client version, you can use the following code:

Code: Select all

IBCConnection.Open;
ShowMessage(TDBAccessUtils.GetIConnection(IBCConnection).GetClientVersion);

Posted: Wed 21 Mar 2012 14:43
by ralfiii
Strange, this returns "6.3".
I connect to a firebird 2.1.3 server with firebird client drivers version 2.5.1

Posted: Thu 22 Mar 2012 12:53
by AndreyZ
I cannot reproduce the problem. I have tried to connect to Firebird server 2.1.3 using the fbclient.dll library from Firebird 2.5.1 and there were no problems with getting the correct client library (2.5). Please try using the latest IBDAC version 4.1.5 and check if the problem persists. If it does, please specify the bitness (x32, x64) of your Firebird server and client. Also make sure that you are really using the fbclient.dll library from Firebird 2.5.1.