Click or drag to resize

DbServer.Locate Method (Typed)

X#
Search sequentially for a record matching a condition. If neither conditions nor scope is passed to the method, it is subject to the general server scope.

Namespace:  XSharp.VO.SDK
Assembly:  XSharp.VORDDClasses (in XSharp.VORDDClasses.dll) Version: 2.21
Syntax
 VIRTUAL METHOD Locate(
	cbForBlock,
	cbWhileBlock,
	uScope
) AS LOGIC CLIPPER
Request Example View Source

Parameters

cbForBlock (Optional)
Type: Usual
The condition evaluated for each record in the scope; if TRUE, the record is included in the processing. It provides the same functionality as the FOR clause of record processing commands.
cbWhileBlock (Optional)
Type: Usual
The condition evaluated for each record from the first record until the condition returns FALSE. It provides the same functionality as the WHILE clause of record processing commands.
uScope (Optional)
Type: Usual
The range of records to process, providing the same functionality as the ALL, REST and NEXT clauses of record processing commands.
ConstantDescription
DBSCOPEALL The scope is all the records in the table. This is the default, although if a WHILE condition is specified, the scope becomes DBSCOPEREST.
DBSCOPERESTThe scope is the remaining records in the table from the current position.

Return Value

Type: Logic
TRUE if a record was found that matches the conditions, FALSE if no match was found or if the operation failed for some other reason. Afterwards, the Found and Status access methods can be used to determine exactly what happened.
Remarks
Sends a NotifyIntentToMove message before the operation.
Sends a NotifyRecordChange message upon completion, whether successful or not.
If no match was found, the current record will be the last file record and DBServer:EOF will be TRUE.
See Also