Database Solutions - Hints & Tips

Tip 11:
$hits and $currhits

$hits returns to the total number of occurrences that match the specified query, for which UNIFACE will have to find and read into memory all the associated records.

$currhits returns the current number of records in the hitlist. A negative value indicates that the current hitlist is not complete and that UNIFACE has only read some of the records matching your search criteria.

Tip: In debug, from later versions of UNIFACE Six onwards, $hits returns the same value as $currhits:

tip11_img01.gif (4828 bytes)

whereas in your proc code a negative value for $hits indicates that an error has occurred (usually the entity specified does not exist).

In version 5, and early versions of UNIFACE Six, examining $hits in the debugger, would complete the hitlist, and retrieve all the matching records.

compuware_01.gif (3977 bytes)


Copyright ©2000 OCS Consulting plc

dbs_block_logo.gif (2150 bytes)
Refresh Frames