草庐IT

CRecordset

全部标签

c++ - 指定 useMultiRowFetch 时,自定义 CRecordset 类不调用 DoFieldExchange()

我已经实现了一个自定义的CRecordset类,并且具有类似于以下的代码:ASSERT(prs->GetRowsetSize()==25);while(!prs->IsEOF()){for(inti=1;iGetRowsFetched();i++){prs->SetRowsetCursorPosition((WORD)i);//Inspectingdatahere...}prs->MoveNext();}prs->Close();显然,当使用多行提取时,CRecordset不会像不使用多行提取时那样调用我的DoFieldExchange重写,这是设计使然。所以我的数据不会自动填充。那么