Get the next record in the scan. Set rid to the record ID of the next record. Return OK if the next record has been found successfully. Return NOMORERECS if all records have been scanned. Otherwise return the error code.