Click or drag to resize

DbServer.Scope Property

The "scope" component of the "general server scope," which affects several bulk processing methods if they are called with no explicit scope.  The initial value of the scope is NIL.

Namespace:  VO
Assembly:  VORDDClasses (in VORDDClasses.dll) Version: 2.7
Syntax
 VIRTUAL PROPERTY Scope AS USUAL GET SET 
Request Example View Source

Property Value

Type: Usual
The "scope" component of the "general server scope," which affects several bulk processing methods if they are called with no explicit scope.  The initial value of the scope is NIL.
Remarks
The following constants represent 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.
Examples
This example illustrates how various Scope values affect the extent of a recall operation:
X#
1// RECALL FOR Last == "Smith" REST
2oDB:ForBlock := {|| Last == "Smith"}
3oDB:Scope := DBSCOPEREST
4oDB:Recall()
5// RECALL WHILE Last == "Smith" NEXT 10
6oDB:WhileBlock := {|| Last == "Smith"}
7oDB:Scope := 10
8oDB:Recall()
See Also