use embeded Firebird
-
20-04-2021 - |
Domanda
I downloaded Firebird-1.5.6.5026-0_embed_win32.zip and copy the file fbembed.dll and firebird.msg and ib_util.dll near my Program. and i use this connection string :
<add name="Connection" connectionString="server type=Embedded;user=SYSDBA;password=masterkey;database=E:\TEST.FDB;dialect=3;charset=NONE;connection lifetime=15;pooling=true;minpoolsize=0;maxpoolsize=50;packet size=8192;servertype=0;clientlibrary=fbembed.dll" providerName="FirebirdSql.Data.FirebirdClient" />
but when i run my project i got error.
Soluzione
you need to add firebird.msg, firebird.conf, icudt30.dll, icuin30.dll, icuuc30.dll and ib_util.dll to your 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.
try it out:
FbConnection con = new FbConnection("User=SYSDBA;" + "Password=masterkey;" + "Database=TEST.FDB;" + "DataSource=127.0.0.1;" + "Port=3050;" + "Dialect=3;" + "Charset=UTF8;");
try {
con.Open();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
here is my original answer and original problem: How to connect and use Firebird db embedded server with Visual C# 2010
Altri suggerimenti
It looks like your connection string is wrong. I can't verify for sure but according to this CodeProject project to use the Firebird database as embedded it should look more like:
"ServerType=1;User=SYSDBA;Password=masterkey;Dialect=3;Database=mydb.fdb"
Notice the ServerType parameter.