Firebirdをサーバーを使わず、組み込みで使用するEmbedded Serverの使い方です。
C++Builder2007とFirebird2.1で動作を確認していますが、他のバージョンのC++Builderでも同様に動作すると思います。
まず、Firebirdを使用したアプリケーションを作成して下さい。
TIBDatabaseのDatabaseNameは、データベースファイルのパスになります。
Firebird 1.xでは、マルチバイト文字を含むパスは使用できません。ご注意下さい。
Firebird 2.x以降では、パスにマルチバイト文字があっても正常に動作します。
実行時に、DatabaseNameを指定することもできます。
IBDatabase1->DatabaseName = ChangeFileExt(Application->ExeName, ".FDB")
公式サイト(www.firebirdsql.org)からEmbedded(Firebird-バージョン番号_Win32_embed.zip)をダウンロードします。
ダウンロードしたファイルを展開します。
展開したら、fbembed.dllのファイル名をgds32.dllに変更します。
アプリケーションとFirebird Embedded Serverのファイルは次のように配置します。
アプリケーション.exe
gds32.dll <- fbembed.dllのファイル名を変更する
ib_util.dll
icudt30.dll
icuin30.dll
icuuc30.dll
firebird.conf
firebird.msg
intl/
fbintl.dll
fbintl.conf
udf/
fbudf.dll
アプリケーションと同じフォルダに、gds32.dll、ib_util.dll、icudt30.dll、icuin30.dll、icuuc30.dll、firebird.conf、firebird.msgを設置します。
アプリケーションと同じフォルダに、intl、udfフォルダを作成し、intlフォルダにはfbintl.dllとfbintl.conf、udfフォルダにはfbudf.dllを設置します。
以上で、完成です。
プログラムを変更することなく、Firebird Embedded Serverを設置するだけで使用することができます。