1. pRecordSet->MoveFirst();
while (!pRecordSet->IsEOF() && !pRecordSet->IsBOF())
{
pRecordSet->SetLong(_T("Numbdb"), iNewDBStartNumber);
iNewDBStartNumber++;
// iIndex++;
pRecordSet->Update(); //提交
pRecordSet->MoveNext();
}
测试上述代码,在access里正常,在sqlite中死循环,具体原因待研究,可能是sqlite不支持这种写法。
2.
UERecordsetPtr pToRecord1 = FindRecord(pToDBFacade, strToTableName, lEnvID1, lElementID1); //查找记录集
if (!pToRecord1 || pToRecord1->IsEOF() || pToRecord1->IsBOF())
return;
//strHref.Format(_T("[%ld/%ld,%s]"), iRtEnviromentID, iRtObjectID, strClassName);
//pToRecord->SetString(_T("Href"), strHref);
pToRecord1->SetString(_T("Description"), strHref1);
pToRecord1->Update();
Update()时提示[Microsoft][ODBC 驱动程序管理器] 无效的字符串或缓冲区长度