有关CComVariant的错误!大虾进来看看!!
我用的是ADO控制数据库,请问这两句代码是什么意思?
BSTR bsSql=strSql.AllocSysString();
m_pRs->Open((CComVariant)bsSql,m_pCon.GetInterface(),adOpenDynamic,adLockOptimistic,adCmdText);
为什么在编译的时候会报这样的错误?
D:\mobil\mobilDlg.cpp(235) : error C2065: 'CComVariant' : undeclared identifier
D:\mobil\mobilDlg.cpp(235) : error C2146: syntax error : missing ')' before identifier 'bsSql'
D:\mobil\mobilDlg.cpp(235) : error C2059: syntax error : ')'
Error executing cl.exe.
mobil.exe - 3 error(s), 0 warning(s)