Why doesn DGGetRecordCount() return an accurate record count in some cases?
DGGetRecordCount() returns the number of the last record that has been accessed in the recordset. The database engine does not actually know how many records are in a recordset until they have all been accessed, because for large databases, it could be very time consuming to count the records. If you want to insure that the record count is accurate, call DGMoveLast() before calling DGGetRecordCount. This insures that the last record has been accessed and the record count is accurate.