Just so I understand what is going on I am going to put comments in the code. Tell me if I am wrong. And this will work until you get to the last row or does it fail at the first row?
/**
* This starts the master loop for all rows of included recordset
*/
while( !pRecordset->IsEOF( ) )
{
//pRecordset->DoFieldExchange(PDX);
buffer = strText.GetBuffer(256);
// insert dummy item to list
if(!pList->InsertItem(iItem,buffer,NULL))
{
// TRACE("\n buffer %s ",buffer);
};
// set item text
/\*\*
\* This will loop through row in recordset and get its value
\*/
for( short index = 0; index < nFields; index++ )
{
This is where it fails
pRecordset->GetFieldValue( index, strText );
This is where it fails and the index is 1 during the failure
if(!strText.CompareNoCase("48")) this is retruned with index = 0
TRACE("\\n");
TRACE("\\nstrText %s ", strText);
buffer = strText.GetBuffer(256);
pList->SetItemText(iItem,index,buffer);
TRACE("\\n item %i field %i buffer %s ",iItem , index , buffer );
strText ="";
}
/\*\*
\* This moves down the row
\*/
pRecordset->MoveNext( );
iItem++;
}