Hello,
I`m having issues setting up a connection from a 64 bit application to an interbase server.
It kind of looks like the 64 bit UniDAC is attempting to load 32 bit dll's which in turn results in fatal errors.
To ensure that we our own code is not at fault, we opened up the UniDacDemo project provided by the installation and we encountered the same issue. On connection attempt it crashes with the following error:
Project UniDacDemo.exe raised exception class Exception with message 'Cannot load client library'.
After searching the unidac connection source code, it looks like the IBCCallUni.pas does not take 64 bit into account when loading the dll's:
{$IFDEF MSWINDOWS}
GDSDLLName = 'gds32.dll';
FBClientDLLName = 'fbclient.dll';
IBXMLDLLName = 'ibxml.dll';
{$ELSE}
I could be wrong here, however when making a small test project and attempting to connect to the same database using FireDAC (TFDConnection) , the connection is successfully established. Doing the same with the TUniConnection component, results in the same fatal error.
Any suggestions how to solve/work around this would be appreciated.
Interbase connection UniDAC x64
Re: Interbase connection UniDAC x64
The error can occur when you use client libraries, bitness of which does not match your application bitness.
The bitness of the used client libraries must match your application bitness, regardless of the bitness of the server you are using.
Both 32 bit and 64 bit Firebird client libraries are called the same - fbclient.dll and each of them comes with the Firebird distribution of the corresponding bitness. To use the 64 bit solution of the Firebird client library, you can download the Firebird 64 bit distribution from http://www.firebirdsql.org/en/downloads and use the fbclient.dll client library distributed with it.
To solve the issue, please try to specify the path to a client library in the TUniConnection.SpecificOptions.Values ['Clientlibrary'] property and use the following code:
The bitness of the used client libraries must match your application bitness, regardless of the bitness of the server you are using.
Both 32 bit and 64 bit Firebird client libraries are called the same - fbclient.dll and each of them comes with the Firebird distribution of the corresponding bitness. To use the 64 bit solution of the Firebird client library, you can download the Firebird 64 bit distribution from http://www.firebirdsql.org/en/downloads and use the fbclient.dll client library distributed with it.
To solve the issue, please try to specify the path to a client library in the TUniConnection.SpecificOptions.Values ['Clientlibrary'] property and use the following code:
Code: Select all
UniConnection1.ProviderName: = 'InterBase';
UniConnection1.SpecificOptions.Values ['ClientLibrary']: = ClientLibraryFullPath;
Re: Interbase connection UniDAC x64
Thanks for the help. That was indeed the issue.
As it turns out, my local installation of interbase does have a 64 bit version of ibclient.dll, called ibclient64.dll. After pointing to that specific dll, it does establish a connection.
As it turns out, my local installation of interbase does have a 64 bit version of ibclient.dll, called ibclient64.dll. After pointing to that specific dll, it does establish a connection.
Re: Interbase connection UniDAC x64
It is good to see that the problem has been solved.
Feel free to contact us if you have any further questions about our products.
Feel free to contact us if you have any further questions about our products.
Re: Interbase connection UniDAC x64
The question remains, why does UniDAC tries to load the gds32.dll in a 64-bit build of the code? We (I am in ehoberg's team) are not using the Firebird client but the Interbase client. The 32-bit client dll is called gds32.dll and the 64-bit client dll is called ibclient64.dll. But the sources make clear that it tries to load gds32.dll even when compiled in 64-bit. Shouldn't that be changed in the sources?
Re: Interbase connection UniDAC x64
We will try adding this functionality to the next UniDAC build.