FDPhysFBDriverLink behaving weirdly with VendorLib

2019-07-27 00:00发布

I'm starting my first application with FireDAC and Firebird 3.0 and I'm having this weird problem with FDPhysFBDriverLink.

Setting it up requires you to set VendorHome and VendorLib to get the driver link working...

When I set them, the driver keeps adding "\bin\" to the end of my VendorHome path.

For example:
In runtime my application FDPhysFBDriverLink's properties are set like this:

FDPhysFBDriverLink.VendorHome := ExtractFilePath(Application.ExeName);
FDPhysFBDriverLink.VendorLib  := 'fbclient_64.dll';

In design they are set in the properties, they are always the same, I can ensure you of that.

I can also ensure you that this DLL is always in the same Folder with the application.

But when I execute my app, FireDAC displays this exception:

[FireDAC][Phys][FB]-314. Cannot load vendor library [C:\Development\bin\fbclient_64.dll]. Não foi possível encontrar o módulo especificado

Hint: check it is in the PATH or application EXE directories, and has x86 bitness.

Just to be clear, ExtractFilePath(Application.ExeName) returns this: C:\Development\. I double checked it.

I tried to create this bin folder inside my application's folder and it started working.

Now the problem is, I don't want to create one folder for a single dll file.

Does anyone know a workaround to this issue or how to fix it properly?

1条回答
我命由我不由天
2楼-- · 2019-07-27 00:32

As suggested by Victoria, setting up VendorLib to the fully qualified path kind of fixes the problem. The problem still exists, but as long as you don't use the VendorHome property, you should be fine.

查看更多
登录 后发表回答