0

我开发了一个带有 firebird 嵌入式数据库的桌面应用程序。我下载了 FirebirdSql.Data.FirebirdClient.dll。我添加了这个 dll 以供参考。我将这些文件添加到输出文件夹

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

我使用这个连接字符串

 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());
                }

但是我得到了这个错误,我从谷歌搜索,但我找不到解决方案有没有人帮助我?注意:我看了这个,但没有用。

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()
4

1 回答 1

1

连接字符串错误。ServerType应该是1

于 2013-03-21T07:24:53.323 回答