fb embedded2 Laz
Fb_embedded2.pas is a Pascal unit that can be included in a Lazarus project to enable embedding of Firebird (version 2.0.3) database server (a.k.a. DBMS) into an
.exe file, without need for distributing any DLL.
The original code for Delphi was created by Fikret Hasovic and Samir Ribic, modified by Zlatko Matic (firstname.lastname@example.org) for FPC/Lazarus.
@ Lazurus CCR SourceForge repository (file:
fb_embedded2.pas works only on Windows. It reads lib from memory stream.
When you unpack the zipped file
fb_embedded2_Laz_1_0.zip, you will see it contains everything needed for embedding Firebird 2.0.3 into your
- Firebird embedded 2.0.3: all required DLLs,
fb_embedded2.pas: unit to be included into your Lazarus project,
FB_Embedded.rc:> textual file to be converted to Windows resource file,
FB_Embedded.res: Windows resource file, used by
- windres utility: used to create
- several other
.ppfiles that should be included into your project.
- These are files from
winddwarf.pasneeded small modification, regarding overloaded
Min()function. I included modified
winddwarf.pasin this distribution, so you can either include modified
windsymbols.pasinto your project or you can modify the original source code. In that case, you need only
fb_embedded2.pasand resource file to be included in your project.
- The change to be done in
winddwarf.pasis the following:
- the for cycle in line 2511
for n := 1 to Min(80, count) do
- must be changed to
for n := 1 to Min(80, LongInt(count)) do
Installation and usage
No installation is required. Just copy the content of this folder into your project directory and include
fb_embedded2.pas and, optionally, other
.pp files from this folder into your application.
You can check paths in
FB_Embedded.rc. If you change paths, recreate
by double clicking the
fb_embedded.bat. Then recompile your application.
The Firebird embedded server will be included in your
.exe, without need for external DLLs.
The good thing is that your data-access components will work with embedded database, without change. For example, I use Zeoslib. Compiled
.exe works without DLLs distributed.
Since Wine 0.9.60, you can run Windows
.exe files compiled with Windows version of Lazarus and
fb_embedded.pas. I have tested it on OpenSuse 10.3, Wine 0.9.60. This is an interesting possibility for cross-platform programming.
Everybody is welcome to improve this code. Currently it works only in Windows. I hope somebody will rewrite it to be cross-platform.
- Firebird embedded "Regular" Firebird embedded (i.e. not bundled as a resource)