0

The character set of the target Oracle DB is US7ASCII, but Korean characters are stored.

When I select the data In my C# program using OLEDB and look at the datagridview, Korean characters are shown as ???.

Environment.SetEnvironmentVariable("NLS_LANG", "AMERICAN_AMERICA.KO16KSC5601");

string connectionString = "Provider=OraOLEDB.Oracle;Data Source=DB;User ID=ID;Password=PW;";

OleDbConnection connection = new OleDbConnection(connectionString);

connection.Open();

OleDbCommand command = new OleDbCommand();

command.CommandText = "SELECT nm FROM table";

command.Connection = connection;

DataTable dataTable = new DataTable();

OleDbDataAdapter dataAdapter = new OleDbDataAdapter(command);
dataAdapter.Fill(dataTable);

dataGridView1.DataSource = dataTable;

connection.Close();

The code above is e.g. of my program. I need help to solve this.

2layers
  • 51
  • 6

0 Answers0