How to solve connection error in c# while using fi

2019-09-20 01:20发布

I develope a desktop application with firebird embeded database. I download FirebirdSql.Data.FirebirdClient.dll.I add this dll to reference. I add these file to output folder

aliases.conf
fbembed.dll
firebird.conf
firebird.msg
ib_util.dll
icudt30.dll
icuin30.dll
icuuc30.dll

And I use this connection string

 String connectionString="ServerType=0;User=SYSDBA;Password=masterkey;Dialect=3;Database=mydb.fdb"; 
 FbConnection con = new FbConnection(connectionString);
                try
                {
                    con.Open();

                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString());
                }

But i got this error and i search from google but i cannot find solution is there anyone help me? Note: I look at this but it didn't work.

http://stackoverflow.com/questions/4014097/how-to-connect-and-use-firebird-db-embedded-server-with-visual-c-sharp-2010?answertab=votes#tab-top

FirebirdSql.Data.FirebirdClient.FbException (0x80004005): Unable to complete network request to host "localhost". ---> Unable to complete network request to host "localhost".
    FirebirdSql.Data.FirebirdClient.FbConnectionInternal.Connect()
    FirebirdSql.Data.FirebirdClient.FbConnectionPool.Create()
    FirebirdSql.Data.FirebirdClient.FbConnectionPool.CheckOut()
    FirebirdSql.Data.FirebirdClient.FbConnection.Open()

标签: c# .net firebird
1条回答
再贱就再见
2楼-- · 2019-09-20 01:53

Connection string is wrong. ServerTypeshould be 1.

查看更多
登录 后发表回答