Search code examples
delphidelphi-2010firebirddbexpress

Delphi 2010: Firebird dbExpress Error Unable to load dbxfb4d14.dll


I just downloaded the dbExpress Driver for Firebird by Chee-Yang Chau from this google code site.

I loaded the Delphi 2010 demo projects and tried running it and immediatedly got a could not load dll error:

dbxfb4dl14.dll error

INI File

[Installed Drivers]
FirebirdConnection=1

[FirebirdConnection] ;DriverUnit=DBXInterBase ;DriverPackageLoader=TDBXDynalinkDriverLoader,DbxCommonDriver120.bpl ;DriverAssemblyLoader=Borland.Data.TDBXDynalinkDriverLoader,Borland.Data.DbxCommonDriver,Version=12.0.0.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b ;MetaDataPackageLoader=TDBXInterbaseMetaDataCommandFactory,DbxInterBaseDriver120.bpl ;MetaDataAssemblyLoader=Borland.Data.TDBXInterbaseMetaDataCommandFactory,Borland.Data.DbxInterBaseDriver,Version=12.0.0.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b GetDriverFunc=getSQLDriverFIREBIRD LibraryName=dbxfb4d14.dll VendorLib=C:\Program Files\Firebird\Firebird_1_5\bin\fbclient.dll BlobSize=-1 CommitRetain=False Database=database.gdb ErrorResourceFile= LocaleCode=0000 Password=masterkey RoleName=RoleName ServerCharSet= SQLDialect=3 Interbase TransIsolation=ReadCommited User_Name=sysdba WaitOnLocks=True Trim Char=False

Delphi Code

procedure TMainForm.Button1Click(Sender: TObject);
var C: TSQLConnection;
begin
  C := TSQLConnection.Create(Self);
  try
    C.DriverName := 'FirebirdConnection';
//    C.LibraryName := 'dbxufb40.dll';
//    C.VendorLib := 'C:\Program Files\Firebird\Firebird_1_5\bin\fbclient.dll';
//    C.GetDriverFunc := 'getSQLDriverFIREBIRD';
    C.Params.Add('User_Name=SYSDBA');
    C.Params.Add('Password=masterkey');
    C.Params.Add('Database=localhost:%ProgramFiles%\Firebird\Firebird_1_5\examples\employee.fdb');
    C.Open;
    if C.Connected then
      ShowMessage('Connection is active')
  finally
    C.Free;
  end;
end;
I noticed that the library name dbxfb4d14.dll in the ini file did not match the actual dll name dbxfb4d15.dll so I modified the ini file so it would match the name of the dll.

Now I get an error saying the dbxfb4d15.dll cannot be found.

dbxfb4d15 error

What am I doing wrong?


Solution

  • You do need the d14 version for Delphi 2010. The d15 version is for XE. Not sure why there is only the d15 version in the zip.

    The DLL is not located on your DLL search path. Once you get hold of the right DLL then you need to make sure it's on the path.

    Having browsed around this component I'm not convinced it's terribly polished. If you can afford it, the Devart drivers come highly recommended.