Problems with using different name for VendorLib.

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for InterBase & Firebird in Delphi and C++Builder
Post Reply
Wodzu
Posts: 23
Joined: Thu 01 Sep 2011 08:35

Problems with using different name for VendorLib.

Post by Wodzu » Thu 01 Sep 2011 08:47

Hello.

We are currently evaluating the driver at my company. We have one problem with it. Firstly, working code:

Code: Select all

unit Unit24;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, WideStrings, DB, SqlExpr, StdCtrls, DBXDevartInterBase;

type
  TForm24 = class(TForm)
    btntest: TButton;
    procedure btntestClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form24: TForm24;

implementation

{$R *.dfm}

procedure TForm24.btntestClick(Sender: TObject);
var
  SQLConnection : TSQLConnection;
begin
  SQLConnection := TSQLConnection.Create(Self);
  SQLConnection.DriverName := 'DevartInterbase';
  SQLConnection.LibraryName := 'dbexpida40.dll'; //  depends on your IDE version. See the table below.
  SQLConnection.VendorLib := 'gds32.dll';
  SQLConnection.GetDriverFunc := 'getSQLDriverInterBase';
  SQLConnection.Params.Clear;
  SQLConnection.Params.Add('User_Name=SYSDBA');
  SQLConnection.Params.Add('Password=masterkey');
  SQLConnection.Params.Add('Database=C:\MyDB.fdb');
  SQLConnection.Open;
  ShowMessage('works?')
end;

end.

The problem is that we are not using library with name 'gds32.dll'. We would like to have a different name for the library and the library is not installed under System32 folder in Windows. Library must be present in the application folder.

For example, I would like to have it such name:

Code: Select all

SQLConnection.VendorLib := 'fbclient.dll'; 
However, if I try to change the name of the library I am getting an error:

'Can't load client DLL: fbclient.dll' in DBXDynalink unit.


Could you provide a solution for this problem?

Regards,

Wodzu

AndreyZ

Post by AndreyZ » Thu 01 Sep 2011 13:21

Hello,

If you want to work with the fbclient.dll client library and you don't want to place this library to the System32 directory, you should place it to the directory with your application (executable file). Please check that there is fbclient.dll in your application directory.

Wodzu
Posts: 23
Joined: Thu 01 Sep 2011 08:35

Post by Wodzu » Thu 01 Sep 2011 15:26

Hello.

Thank you for your answer. I've placed the library into the application folder. I've also placed it into the System32 path. I am still getting this error. I have Delphi 2009 Professional with latest updates.

Could you help me somehow? My company will probably buy the library if you help me to solve this problem.

Regards.

AndreyZ

Post by AndreyZ » Fri 02 Sep 2011 08:22

Please specify the exact version of Firebird you are using. I will create a project and send it to you, so you will be able to check if it works on your computer. Please specify an e-mail that I can use for sending this project.

Wodzu
Posts: 23
Joined: Thu 01 Sep 2011 08:35

Post by Wodzu » Fri 02 Sep 2011 11:19

Hi Andrey.

Thank you very much for your time.

The Firebird version which we are using is 2.5. it might be 32 bit or 64 bit depending on our clients. It can also be embedded.

The thing is, that if I take the fbclient.dll and rename it to gds32.dll it works fine. This is not the problem with the dll itself.

I will send you my e-mail on personal message.

Once again thanks.

Ok, I see that I cant send you a personal message. So here is my mail:

brucedickinson[at]wp.pl

AndreyZ

Post by AndreyZ » Fri 02 Sep 2011 13:38

I've sent you my project. Please check if it works on your computer. Also note that you cannot use 64bit Firebird libraries in Delphi, because Delphi doesn't support x64 platform. You can use 64bit Firebird libraries only if you work with Delphi XE2.

Wodzu
Posts: 23
Joined: Thu 01 Sep 2011 08:35

Post by Wodzu » Fri 02 Sep 2011 18:17

Thank you Andrey.
You had right the problem was 64 bit library.
But what is stange for me, the same library works when I connect to the database without using DBX interface.

Once again thanks.

I'll tell the management to buy your product. :)

Post Reply