How to connect and use Firebird db embedded server with Visual C# 2010

I finally I found the solution after 6 hours of work :)

most of answers on google are either wrong or so old. all of them say that I only need to include fbembed.dll file to my project..

after some investigations I made. I found that I also need to add firebird.msg, firebird.conf, icudt30.dll, icuin30.dll, icuuc30.dll and ib_util.dll to my project files and to the output folder..

important notice: never use compact .Net data provider. because they made it for Normal and super firebird servers only. it won't work with embedded servers.


With Firebird 2.5 embedded, I copy all this files to the application directory :

aliases.conf (optional)
fbembed.dll
firebird.conf
firebird.msg
ib_util.dll
icudt30.dll
icuin30.dll
icuuc30.dll
Microsoft.VC80.CRT.manifest  : -- Not sure if this 3 files are necessary
msvcp80.dll                  : -- but i copy them :)
msvcr80.dll                  : -- see http://www.firebirdnews.org/?p=2248
intl\fbintl.conf   : Without those files you can't use
intl\fbintl.dll    : all charset and collations
udf\*  : if you want to use pre-build UDF

In the connection string, I specify that the server is embedded wih serverType=1:

User=SYSDBA;Password=masterkey;Database=E:\TEST.FDB;Dialect=3;Charset=UTF8;ServerType=1;

I forgot also IDPLicense.txt and IPLicense.txt, I think we have to also distribute them with the application for license issue ?


I put the Firebird DLLs in a dir in the project called Firebird. Added a Post Build event to copy the files.

copy $(ProjectDir)Firebird\*.dll $(ProjectDir)$(OutDir)*.dll"