使用firebird打开连接时出现System.BadImageFormatException错误

时间:2016-01-01 15:29:42

标签: c# firebird-embedded

尝试将Firebird数据库与c#win表单一起使用。在尝试打开连接时,它向我显示以下错误。

An unhandled exception of type 'System.BadImageFormatException' occurred in FirebirdSql.Data.FirebirdClient.dll

其他信息:尝试加载格式不正确的程序。 (HRESULT异常:0x8007000B)

我的连接字符串是

        <add name="dbConFirebirdSQL" connectionString="User Id=locuser_r;Password=locpassword_r;Database=LOCDBOES_R.FDB;ServerType=Embedded;" />


string sql5 = "sql query here";
                                try
                                {
                                    FbConnection con95 = new FbConnection(connectionString);
                                    con95.Open();
                                    FbCommand cmd95 = new FbCommand(sql5, con95);
                                    cmd95.Parameters.Add("@t_id", FbDbType.Integer).Value = tid;

                                    cmd95.CommandType = CommandType.Text;
                                    cmd95.ExecuteNonQuery();
                                }
                                catch (FbException ex)
                                {
                                    MessageBox.Show("4--" + ex.Message);
                                }

请告知可能出现的问题。

0 个答案:

没有答案
相关问题