Master
Master

Reputation: 338

Unable to load Firebird client library on Windows 10

Tw days ago, I installed Windows 10 build 1709 16299.192 and Embarcadero Delphi 10.2.2 Tokyo.

Since I installed them, my applications can't load the Firebird client library at runtime.

If I have an exe file compiled with older Windows and Delphi 10.2.2, it works fine, but every exe file compiled with the new Windows and Delphi are not working.

If I test a connection through TFDConnection, it connects successfully, but when I run the application I get this error:

[firedac][phys][fb]-314 cannot load vendor library [c:\users\username\desktop\projectname\bin\fbclient.dll] The specified module could not be found
Hint: check it is in the PATH or application EXE directories, and has x86 bitness.

The path is correct, and the client library is for x86. The same application was working before installing Windows 10 build 1907 16299.192.

I tried DevArt UniDac and compiled as Win64, still have the same problem.

Reinstalling Windows and Delphi 10.2.2 (tested with 2 versions 25.0.28979.1978 and 25.0.29039.2004) still didn't help.

I think it's a permissions issue, but I don't know how to fix it. I gave bds.exe all permissions over all groups, but still not working.

I have only this code on my test application

procedure TForm1.FormCreate(Sender: TObject);
var
  Path: string;
begin
  Path := IncludeTrailingPathDelimiter(ExtractFilePath(Application.ExeName));
  FDPhysFBDriverLink1.VendorHome := Path;
  FDPhysFBDriverLink1.VendorLib := 'fbclient.dll';
  FDConnection1.Params.Database := Path + 'FBDV3.0.FDB';
  FDConnection1.DriverName := 'FB';
  FDConnection1.Params.UserName := 'sysdba';
  FDConnection1.Params.Password := 'masterke';
  FDConnection1.LoginPrompt := False;
  FDConnection1.Connected := True;
end;

Included Files and Folders in bin Folder:

plugins (Folder contain engine12.dll)
fbclient.dll
ib_util.dll
icudt52.dll
icudt52l.dat
icuuc52.dll

Upvotes: 4

Views: 10259

Answers (1)

maf-soft
maf-soft

Reputation: 2552

I just had to install the Microsoft Visual C++ 2010 Redistributable.

It took me hours of trying and trying many things, I couldn't find any clue what causes it, even by debugging deep into the FD sources (Delphi 10.4.2). Too bad there is no useful error message anywhere. But then I used SysInternals Process Explorer and found this dependency. Thanks to @Remy. (Just copying msvcr100.dll didn't help in my case.)

Of course I cannot say if this would have helped here, but at least it could help many others. The symptoms were the same - it worked in the IDE (data explorer), but not in the compiled application, even though the dll was there.

By debugging I also verified that the error message asking for not only fbclient.dll, but also fbembed.dll, is not a sign of any wrong parameters: it is always looking for the second one if the first one cannot be loaded (not only if it is not found).

Upvotes: 3

Related Questions