Hello ,
I have problem with text encoding.

How can I change text encoding in connection parameters or string encoding ?

My code:

ArrayList dataFromDB = new ArrayList();

        string query = "select filialnr, filialbezeichnung from filiale order by 1";
        string baza = "Data Source=PLHQ001L;User Id=xxx;Password=xxx;";

        OracleConnection conn = new OracleConnection(baza);

        conn.Open();
        OracleCommand cmd = new OracleCommand(query, conn);
        cmd.CommandType = CommandType.Text;

        OracleDataReader dr = cmd.ExecuteReader();

         while (dr.Read())
        {
            for (int i = 0; i < dr.FieldCount; i = i + 1)
            {
                dataFromDB.Add(dr[i]);

            }
        }
        conn.Close();



        //Clear dataGridView
        for (int RowId = 0; RowId <= dataGridView1.RowCount; RowId++)
        {
            dataGridView1.Rows.Clear();
        }


        int rowNum = 0;
        for (int i = 0; i < dataFromDB.Count; i = i + 8)
        {
            dataGridView1.Rows.Add();
            dataGridView1[0, rowNum].Value = dataFromDB[i];
            dataGridView1[1, rowNum].Value = dataFromDB[i + 1];
            rowNum++;
        }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.