关于GetCollcet()
CString str_tmp[16];
while (!pApp->m_pRecordset->adoEOF)
{
for(;j>0;j--)
{
TheValue = pApp->m_pRecordset->GetCollect(str_tmp[j]);
if(TheValue.vt!=VT_NULL)
p->SetItemText(i,x,(LPCSTR)(_bstr_t)TheValue);
}
i++;
}
1.我想getcollect()记录集,但想得到的字段在str_tmp中,现在这样写有语法错误.参数不匹配.该怎样改一下
[解决办法]
TheValue = pApp->m_pRecordset->GetCollect(_variant_t(str_tmp[j]));
[解决办法]
GetCollect((LPCTSTR) str_tmp[j]);
[解决办法]
while (!pApp-> m_pRecordset-> adoEOF)
{
for(;j> 0;j--)
{
TheValue = pApp-> m_pRecordset-> GetCollect(1);
if(TheValue.vt!=VT_NULL)
p-> SetItemText(i,1,(LPCSTR)(_bstr_t)TheValue);
}
i++;
}
你没有movenext()
无线循环了