Error "CHARACTER SET ISO8859_1 is not installed" only when using JOIN

461 Views Asked by At

I'm making a Windows Form App that reads Firebird database and displays the data.

I'm using a DLL file a coworker recommended: FirebirdSql.Data.FirebirdClient.dll

Here's an example of how I read the data:

class FBConnect
{
    private FbConnection MyConnection= new FbConnection();
    private FbConnectionStringBuilder ConnectionString;

    //Constructor
    public FBConnect()
    {
        ConnectionString= new FbConnectionStringBuilder();
        {
            var withBlock = ConnectionString;
            withBlock.Database = "MyFile.fdb";
            withBlock.ServerType = FbServerType.Embedded;
            withBlock.UserID = "USID";
            withBlock.Password = "Key";
            withBlock.Pooling = true;
        }
        MyConnection.ConnectionString = ConnectionString.ToString();
    }

    public DataTable RunQuery(string query)
    {
        try
        {
            MyConnection.Open();
            if (MyConnection.State == ConnectionState.Open)
            {
                DataTable dt = new DataTable();
                FbDataAdapter da = new FbDataAdapter(query, MyConnection.ConnectionString);
                da.Fill(dt);
                return dt;
            }
            else
            {
                return null;
            }
        }
        catch (FbException err)
        {
            MessageBox.Show(err.Message, "Firebird error " + err.ErrorCode, MessageBoxButtons.OK, MessageBoxIcon.Error);
            return null;
        }
        finally
        {
            MyConnection.Close();
        }
    }
}

And then, from another class, I call:

FBConnect conn = new FBConnect();
dataGridView1.DataSource = conn.RunQuery("SELECT * FROM table1");

and it works just fine, I get to see the data. The problem comes exclusively when I use a JOIN in my query: then I get an exception

Firebird error 335544854
CHARACTER SET ISO8859_1 is not installed

What can be causing this and how do I solve it?

Here's the query I'm using

SELECT FACTF.CVE_DOC AS "Clave de Documento",  VENDEDOR.NOMBRE AS "Nombre del vendedor" FROM FACTF01 FACTF LEFT JOIN VEND01 VENDEDOR ON VENDEDOR.CVE_VEND=FACTF.CVE_VEND
0

There are 0 best solutions below