0

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()
2
  • It looks like your application is ignoring the embedded part and performing a standard connection request trough the network. Are you sure fbembed.dll is beging loaded by your program? Some database access layers require fbembed.dll to be renamed to the former firebird client (fbclient.dll) in order to work, but I don't know the .NET client, so I'm not sure about this. Commented Mar 21, 2013 at 0:41
  • thanks for response.I renamed the fbemded.dll to fbclient.dll another error occured. Commented Mar 21, 2013 at 6:36

1 Answer 1

1

Connection string is wrong. ServerTypeshould be 1.

Sign up to request clarification or add additional context in comments.

6 Comments

I got this error System.BadImageFormatException: (HRESULT özel durum döndürdü: 0x8007000B) FB_965910463_Class.isc_attach_database(IntPtr[] statusVector, Int16 dbNameLength, Byte[] dbName, Int32& dbHandle, Int16 parmBufferLength, Byte[] parmBuffer) FB_965910463_Class.IFbClient.isc_attach_database(IntPtr[] statusVector, Int16 dbNameLength, Byte[] dbName, Int32& dbHandle, Int16 parmBufferLength, Byte[] parmBuffer) FirebirdSql.Data.Client.Native.FesDatabase.Attach(DatabaseParameterBuffer dpb, String dataSource, Int32 port, String database)
Your app is 64bit and you have 32bit fbembed.dll (or vice versa).
My app is 64bit and I download NETProvider-3.0.2.0-NET40.7z from firebirdsql.org/en/net-provider for provider and I download other files from sourceforge.net/projects/firebird/files/firebird-win64/… when I use these files I got error
System.DllNotFoundException: Unable to load DLL 'fbembed' FB_965910463_Class.isc_attach_database(IntPtr[] statusVector, Int16 dbNameLength, Byte[] dbName, Int32& dbHandle, Int16 parmBufferLength, Byte[] parmBuffer) FB_965910463_Class.IFbClient.isc_attach_database(IntPtr[] statusVector, Int16 dbNameLength, Byte[] dbName, Int32& dbHandle, Int16 parmBufferLength, Byte[] parmBuffer) FirebirdSql.Data.Client.Native.FesDatabase.Attach(DatabaseParameterBuffer dpb, String dataSource, Int32 port, String database)
FirebirdSql.Data.FirebirdClient.FbConnectionInternal.Connect() FirebirdSql.Data.FirebirdClient.FbConnectionPool.Create() FirebirdSql.Data.FirebirdClient.FbConnectionPool.CheckOut() FirebirdSql.Data.FirebirdClient.FbConnection.Open() FirebirdApp.Form1.button1_Click(Object sender, EventArgs
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.