OrphanToRecover method

Applies To
TQDB, TQDBItem, TQDBView

Declaration
function OrphanToRecover : boolean;

Description
The OrphanToRecover method checks the system's temporary directory for any of QDB's working files. Such files should only exist when a QDB component is currently at work on a file but, if a QDB component happens to fail before it is properly closed (e.g., on rebooting the system), the orphaned working files will persist.

If OrphanToRecover finds a set of working files it tests to see if they are currently in use. If not they are counted as orphans of a past QDB file and, maybe, recoverable. Genuine orphans cause OrphanToRecover to return true (and otherwise false).

Note, however, that the two working files belonging to any QDB file may not be in sync since changes to the item file happen immediately but changes to the key file occur only as a result of the Save and SaveAs methods. Recover will only restore the state of the QDB file at the last save.