被这个问题纠结了一晚上,上网查了很多帖子,有说本地Oracle字符集问题的,有说连接字符串中加入“Unicode=true”的,感觉都不对,验证了也确实不能解决问题。
问题描述:
DBConn.cs
==============================
OleDbConnection conn = new OleDbConnection("Provider=OraOLEDB.Oracle;Server=" + Properties.Settings.Default.ServerAddress +
";Data Source=(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)
(HOST = " + Properties.Settings.Default.ServerAddress + ")(PORT = 1521)))
(CONNECT_DATA =(SERVICE_NAME = " + Properties.Settings.Default.DbServiceName + ")));
User ID=" + userID + ";Password=" + userPWD + ";");
Gateway.cs
===