想实现模糊查询,添加了个combobox控件,提取输入的中文strTemp,然后插入sql语句中,一直有问题,搞半天了还是不行,求大神指点一二! ((CComboBox*)GetDlgItem(IDC_COMBO2))->GetWindowText(strTemp); str1.Format(_T("SELECT * FROM HY_STSC_A where STNM LIKE '%"+strTemp+"%'")); if (!theApp.m_ado.Select(str1)) MessageBox(theApp.m_ado.GetLastError());
((CComboBox*)GetDlgItem(IDC_COMBO2))->GetWindowText(strTemp);
str1.Format(_T("SELECT * FROM HY_STSC_A where STNM LIKE '%"+strTemp+"%'"));
if (!theApp.m_ado.Select(str1)) MessageBox(theApp.m_ado.GetLastError());