try
{
int count = 0;
CString str;
my_record.Open(CRecordset::forwardOnly, _T("select * from user"));
if(my_record.IsBOF())
{
return;
}
while(!my_record.IsEOF())
{
my_record.GetFieldValue((short)0, str);
m_list_ctrl.InsertItem(count, str);
my_record.GetFieldValue(1, str);
m_list_ctrl.SetItemText(count, 1, str);
my_record.GetFieldValue(2, str);
m_list_ctrl.SetItemText(count, 2, str);
my_record.GetFieldValue(3, str);
m_list_ctrl.SetItemText(count, 3, str);
my_record.MoveNext();
count++;
}
}
结果汉字全是问号,字母数字没问题
{
int count = 0;
CString str;
my_record.Open(CRecordset::forwardOnly, _T("select * from user"));
if(my_record.IsBOF())
{
return;
}
while(!my_record.IsEOF())
{
my_record.GetFieldValue((short)0, str);
m_list_ctrl.InsertItem(count, str);
my_record.GetFieldValue(1, str);
m_list_ctrl.SetItemText(count, 1, str);
my_record.GetFieldValue(2, str);
m_list_ctrl.SetItemText(count, 2, str);
my_record.GetFieldValue(3, str);
m_list_ctrl.SetItemText(count, 3, str);
my_record.MoveNext();
count++;
}
}
结果汉字全是问号,字母数字没问题
右键【我的电脑】【属性】【高级系统设置】
点击【环境变量】按钮。
新建环境变量
变量名:NLS_LANG
变量值:SIMPLIFIED CHINESE_CHINA.ZHS16GBK
点击【确定】按钮。
这个是我配置oracle环境变量用的,您这个也应该是环境变量的问题。
您先试试这个好使不,不好使的话自己百度一下。