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:
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
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.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=SYSD开发者_JAVA技巧BA');
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;
Now I get an error saying the dbxfb4d15.dll cannot be found.
What am I doing wrong?
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.
精彩评论