DbServer.Count Method (Typed) | |
Return the number of records that match a specified scope.
Namespace:
XSharp.VO.SDK
Assembly:
XSharp.VORDDClasses (in XSharp.VORDDClasses.dll) Version: 2.21
Syntax VIRTUAL METHOD Count(
cbForBlock AS USUAL,
cbWhileBlock AS USUAL,
uScope AS USUAL
) AS LONG
public virtual int Count(
[DefaultParameterValueAttribute(0, 1)] Usual cbForBlock,
[DefaultParameterValueAttribute(0, 1)] Usual cbWhileBlock,
[DefaultParameterValueAttribute(0, 1)] Usual uScope
)
Request Example
View SourceParameters
- cbForBlock
- 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
- 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
- Type: Usual
The range of records to process, providing the same functionality as the ALL, REST and NEXT clauses of record processing commands.
Constant | Description |
---|
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.
|
DBSCOPEREST | The scope is the remaining records in the table from the current position. |
Return Value
Type:
Long
The number of records that match the scope.
Remarks
Sends a NotifyIntentToMove message before the operation.
Sends a NotifyRecordChange message upon completion.
On successful completion, the current record will be the last file record and DBServer:EOF will be TRUE.
Examples
Compare with the way the COUNT command is used:
1COUNT TO nBranchCnt FOR Branch = 100
2nBranchCnt := oDBSales:Count({||Branch=100})
See Also