VC++SetItemText": 不能将参数 3 从"char *"转换为"LPCTSTR"
if(!openADO.m_pRecordset->adoEOF)//判断记录是否存在{m_clearlist.InsertItem(0,_T(""));m_clearl...
if(!openADO.m_pRecordset->adoEOF) //判断记录是否存在
{
m_clearlist.InsertItem(0,_T(""));
m_clearlist.SetItemText(0,0,(char*)(_bstr_t)openADO.m_pRecordset->GetCollect(_T("分类")));
m_clearlist.SetItemText(0,1,(char*)(_bstr_t)openADO.m_pRecordset->GetCollect(_T("类型")));
mm_clearlist.SetItemText(0,2,(char*)(_bstr_t)openADO.m_pRecordset->GetCollect(_T("地址")));
openADO.m_pRecordset->MoveNext();//将记录集指针移动到下一条记录
}
//m_clearlist为视图列表控件变量 展开
{
m_clearlist.InsertItem(0,_T(""));
m_clearlist.SetItemText(0,0,(char*)(_bstr_t)openADO.m_pRecordset->GetCollect(_T("分类")));
m_clearlist.SetItemText(0,1,(char*)(_bstr_t)openADO.m_pRecordset->GetCollect(_T("类型")));
mm_clearlist.SetItemText(0,2,(char*)(_bstr_t)openADO.m_pRecordset->GetCollect(_T("地址")));
openADO.m_pRecordset->MoveNext();//将记录集指针移动到下一条记录
}
//m_clearlist为视图列表控件变量 展开
2个回答
2014-10-29
展开全部
//转换一下先
_variant_t var;
CString strTemp ;
var=openADO.m_pRecordset->GetCollect(" " ..... //..
strTemp = var.vt == VT_NULL?"":(char*)(_bstr_t)var;
m_clearlist.SetItemText(0,0,strTemp );
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询