Hi Rocky
We have purchased your video series and it is great.
We are using your ArrayDataReader class to mock our databases just as you did in your demo005 but I have fixed the class to accomodate a single row of data and when the NextResult() is called it resets the rowcount to zero again. Please find fixes below:
public bool NextResult()
{
_resultSet++;
if (_resultSet < _data.Count)
{
//------------------------------
_row = 0;
// reset row counter
//------------------------------
return true;
}
else
return false;
}
public bool Read()
{ _row++;
//------------------------------
// -1 not -2 because only one field header row
if (_row > _data[_resultSet].GetLength(0) - 1)
//------------------------------
return false;
else
return true;
}
Thanks, I appreciate it!
Copyright (c) Marimer LLC