Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: FireDAC TFDPhysFBDriverLink.VendorLib doesn't override setting from INI


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 5 - Last Post: Dec 21, 2016 5:17 AM Last Post By: Dmitry Arefiev
Norbert Meier

Posts: 19
Registered: 11/26/01
FireDAC TFDPhysFBDriverLink.VendorLib doesn't override setting from INI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 20, 2016 7:59 AM
Hello,

Setting the property TFDPhysFBDriverLink.VendorLib to

FDPhysFBDriverLink1.VendorLib := tpath.Combine( ExtractFilePath(Application.ExeName) , 'Firebird\fbembed.dll');"

will not override setting defined in global FDdrivers.ini

[FDDrivers.ini]
Encoding=UTF8

[FB]
; Firebird libraries
VendorLibWin64=C:\Program Files\Firebird\Firebird_2_5\bin\fbclient.dll
VendorLibWin32=C:\Program Files\Firebird\Firebird_2_5\WOW64\fbclient.dll

Either you get (if the file/path defined in FDdrivers.ini doesn't exist):

[FireDAC][Phys][FB]-314. Cannot load vendor library [C:\Program Files\Firebird\Firebird_2_5\WOW64\fbclient.dll]. The System can not find specified path.
Hint: check it is in the PATH or application EXE directories, and has x86 bitness.


or the more compicated error to identify the issue (if the file exist, but the Firebird Server is done)

[FireDAC][Phys][FB]unavailable database

The global FDdrivers.ini file is used by another application, so I can't change it.
The only way I found to solve this is: To deploy empty files FDconnectionDefs.INI and empty FDrivers.ini in the application exe path.

Is there a way to override the "VendorLibWin32" setting as well via Setting a property of TFDPhysFBDriverLink?

Regards
Norbert

Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: FireDAC TFDPhysFBDriverLink.VendorLib doesn't override setting from INI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 21, 2016 2:27 AM   in response to: Norbert Meier in response to: Norbert Meier
will not override setting defined in global FDdrivers.ini

This issue was fixed several versions ago ...

Is there a way to override the "VendorLibWin32" setting as well via Setting a property of TFDPhysFBDriverLink?

You can use FireDAC virtual drivers:
http://docwiki.embarcadero.com/RADStudio/Berlin/en/Configuring_Drivers_(FireDAC)#Base_and_Virtual_Drivers

For that:
* set TFDPhysFBDriverLink.DriverID to 'MyFB'
* use DriverID=MyFB in connection definition parameters
* set TFDPhysFBDriverLink.VendorLib to required value

Then your connection will use MyFB settings instea of FB settings.

--
With best regards,
Dmitry
Norbert Meier

Posts: 19
Registered: 11/26/01
Re: FireDAC TFDPhysFBDriverLink.VendorLib doesn't override setting from INI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 21, 2016 3:10 AM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
Hi Dmitry,

I did that, but the problem could only be solved by placing empty FDconnectionDefs.ini and FDrivers.ini in the application folder.

I can send you a sample app, that doesn't work on my system, if you like.

With best Regards
Norbert
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: FireDAC TFDPhysFBDriverLink.VendorLib doesn't override setting from INI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 21, 2016 3:30 AM   in response to: Norbert Meier in response to: Norbert Meier
I can send you a sample app, that doesn't work on my system, if you like.

Please upload it (and corresponding INI's) to attachments forum.
Also, what is your RAD Studio version ?

--
With best regards,
Dmitry
Norbert Meier

Posts: 19
Registered: 11/26/01
Re: FireDAC TFDPhysFBDriverLink.VendorLib doesn't override setting from INI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 21, 2016 4:12 AM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
I posted the sample app in attachments Forum.

See:
[https://forums.embarcadero.com/thread.jspa?threadID=245132&tstart=0]

The Problem occur in Delphi XE6.

Best Regards
Norbert
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: FireDAC TFDPhysFBDriverLink.VendorLib doesn't override setting from INI  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 21, 2016 5:17 AM   in response to: Norbert Meier in response to: Norbert Meier
The Problem occur in Delphi XE6.

Your sample works OK in DX 10.1.
It seems, that many things in this area were fixed since XE6 ...

--
With best regards,
Dmitry
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02