不存在定义的从stdbasic_string<char,stdchar_traits<char>stdallocator<char到constvariant_t的适当转换
C++链接数据库时出现这种错误stringFJH=0,KHSH=0;cout<<"请输入分机号"<<endl;cin>>FJH;cout<<"请输入客户税号"<<endl...
C++链接数据库时出现这种错误
string FJH=0,KHSH=0;
cout<<"请输入分机号"<<endl;
cin>>FJH;
cout<<"请输入客户税号"<<endl;
cin>>KHSH;
try
{
m_pRecordset->Open("select cpzt from XSGL_YDKPZC where fjh="+FJH+" and khsh="+KHSH,(IDispatch*)sqlSp,adOpenDynamic,adLockOptimistic, adCmdText);
}
catch (_com_error &e)
{
cout << e.Description()<<endl;
}
2 IntelliSense: 不存在用户定义的从 "std::basic_string<char, std::char_traits<char>, std::allocator<char>>" 到 "const _variant_t" 的适当转换 c:\users\sancike\documents\visual studio 2010\projects\wanchengban\wanchengban\stdafx.cpp 40 33 wanchengban
错误 1 error C2664: “Recordset15::Open”: 不能将参数 1 从“std::basic_string<_Elem,_Traits,_Ax>”转换为“const _variant_t &” c:\users\sancike\documents\visual studio 2010\projects\wanchengban\wanchengban\stdafx.cpp 40 1 wanchengban 展开
string FJH=0,KHSH=0;
cout<<"请输入分机号"<<endl;
cin>>FJH;
cout<<"请输入客户税号"<<endl;
cin>>KHSH;
try
{
m_pRecordset->Open("select cpzt from XSGL_YDKPZC where fjh="+FJH+" and khsh="+KHSH,(IDispatch*)sqlSp,adOpenDynamic,adLockOptimistic, adCmdText);
}
catch (_com_error &e)
{
cout << e.Description()<<endl;
}
2 IntelliSense: 不存在用户定义的从 "std::basic_string<char, std::char_traits<char>, std::allocator<char>>" 到 "const _variant_t" 的适当转换 c:\users\sancike\documents\visual studio 2010\projects\wanchengban\wanchengban\stdafx.cpp 40 33 wanchengban
错误 1 error C2664: “Recordset15::Open”: 不能将参数 1 从“std::basic_string<_Elem,_Traits,_Ax>”转换为“const _variant_t &” c:\users\sancike\documents\visual studio 2010\projects\wanchengban\wanchengban\stdafx.cpp 40 1 wanchengban 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询