Click or drag to resize

VoDbClearLocate Function

Clear a locate condition by deleting the locate code block.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.10
Syntax
 FUNCTION VoDbClearLocate() AS LOGIC
View Source

Return Value

Type: Boolean
TRUE if successful; otherwise, FALSE.
Remarks
VODBClearLocate() clears the locate condition by deleting the locate code block.   By default, this function operates on the currently selected work area.  It can be made to operate on an unselected work area by specifying it within an aliased expression A locate condition can be set by DBLocate(), VODBLocate(), VODBSetLocate(), or the LOCATE command. Note that this function does not call the error handler and will not, therefore, produce a runtime error message or create an error object if it fails.  Thus, it may be important to check the return value to determine if the function succeeded. The global structure, StrucErrInfo, will contain needed information regarding any error that occurs.
Examples
This example sets and retrieves a locate code block, evaluates it against the current record, and finally cleans up:
X#
DBUseArea(TRUE, "DBFNTX", "address",;
                                "Address", TRUE)
VODBSetLocate({|| Name == "Odile"})
// Process filtered records
VODBClearLocate()
// Process unfiltered records
DBCloseArea()
See Also