Firebird 3.0.7 Embedded with Delphi & Firedac
Unlike Firebird 2.5, Firebird 3 does not need a different DB connection library.
In Windows, until today to distribute embedded Firebird fbembedd.dll was used instead of fbclient.dll, now with Firebird 3.0 fbclient.dll is always used both for the connection to a Firebird server and for the management of embedded / local DBs.
In firebird the Embedded connection is managed by the engine12.dll library, check that it is present in the system in the directory <firebirdlibrari> \ plugins \ engine12.dll
Check in firebird.conf that engine12 communication is enabled in “protocols”
1 |
Providers = Remote,Engine12,Loopback |
Configure Firedac physical driver, simply by specifying the location of the connection library:
1 2 3 4 |
FDPhysFBDriverLink1.vendorHome := ''; FDPhysFBDriverLink1.VendorLib := appPath + TPath.DirectorySeparatorChar + 'bin\fbclient.dll'; |
Connection parameters to FiredacConnection (obviously assign the newly configured FDPhysFBDriverLink):
1 2 3 4 5 6 |
FDConn.DriverName := 'FBEmbedded'; FDConn.LoginPrompt := False; FDConn.Params.Clear; FDConn.Params.add(''); FDConn.Params.add('User_Name=' + DataBaseConnectionParam.userName); FDConn.Params.add('DriverID=FBEmbedded'); |
Firebird guide: https://www.firebirdsql.org/en/documentation/
On-line docu: https://firebirdsql.org/file/documentation/html/en/refdocs/fbdevgd30/firebird-30-developers-guide.html
Embarcadero:
- http://docwiki.embarcadero.com/RADStudio/Sydney/en/Connect_to_Firebird_(FireDAC)
- http://docwiki.embarcadero.com/RADStudio/Sydney/en/Configuring_Drivers_(FireDAC)
Stackoverflow: https://stackoverflow.com/questions/53817952/problem-connecting-to-firebird-3-embedded-with-c-sharp-in-net