I want to select some rows from a Access-Database with class CMyRecordset
(derived from MFC-Class CRecordset).
I use code like this (for a simple SELECT-Statement):
int IsDone = MyRecordset.Open(CRecordset::snapshot,
"SELECT A.VERSNR FROM AVDB A WHERE
A.SAMMELNR LIKE '00000';",
// do anything with the data
} while (!MyRecordset.IsEOF());
As result, I get several lines of the database. The result is correct, but
after processing the last result-line, IsEOF() returns false, so MoveNext()
is called but does not find a next entry. And this last call of MoveNext()
is too slow for doing serious work with my application.
The same coding works fine (and fast!) with Access 95.
Any ideas whats wrong?