Firebird db connection string
18:28 01 Jan 2016

When i run the c# code with firebird db as backend it shows.My code is plain and simple then why is it showing such an error??

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

Additional information: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

    private void button1_Click(object sender, EventArgs e)
    {
        string connectionString =
                                    "User=SYSDBA;" +
                                    "Password=masterkey;" +
                                    "Database=TESTFB.fdb;" +
                                    "DataSource=localhost;" +
                                    "Port=3050;" +
                                    "Dialect=3;" +
                                    "Charset=NONE;" +
                                    "Role=;" +
                                    "Connection lifetime=15;" +
                                    "Pooling=true;" +
                                    "MinPoolSize=0;" +
                                    "MaxPoolSize=50;" +
                                    "Packet Size=8192;" +
                                    "ServerType=1;";
        //string sql = "INSERT INTO STUDENT(ID,NAME) VALUES(@ID,@NAME)";
        string sql = "SELECT * FROM STUDENT WHERE ID=@ID AND NAME=@NAME;";
        try
        {
            FbConnection con = new FbConnection(connectionString);
            con.Open();
            FbCommand cmd = new FbCommand(sql, con);
            cmd.Parameters.Add("@ID", FbDbType.Integer).Value = Convert.ToInt32(textBox1.Text);
            cmd.Parameters.Add("@ID", FbDbType.VarChar).Value = textBox2.Text;

            cmd.CommandType = CommandType.Text;
            cmd.ExecuteNonQuery();
        }
        catch (FbException ex)
        {
            MessageBox.Show("5--" + ex.Message);
        }
    }
c# firebird2.5