在下做了个winfrom软件,用来查询数据库的
但是,数据库中的中文字段显示是乱码。又不能更改数据库编码。我查询的时候要转成中文的,但是我有条件查询的时候,还得从新编译过去,数据库才能识别,不然SQL语句查询的都是空的。
     comboBox2.Visible = true;            string sql = "SELECT country_cn FROM cai_tm_country WHERE country_region='";
            if (comboBox1.Text != " ")
            {
                sql += comboBox1.Text.Trim() + "'";
            }
            DataSet ds = MySqlHelper.ExecuteDataSet(sql, null);
            DataTable dt = ds.Tables[0];
            foreach (DataRow r in dt.Rows)
            {
                comboBox2.Items.Add(Cionverts.DisplayCN(r["country_cn"].ToString())); //Cionverts.DisplayCN是自己定义的编码转换的,
            }那我怎么把他在转回去呢? 请高手帮忙