DbServer.GetArray Method | |
Retrieve an array of values from a field in the server, subject to the currently active selection, if any.
Namespace:
VO
Assembly:
VORDDClasses (in VORDDClasses.dll) Version: 2.19
Syntax VIRTUAL METHOD GetArray(
nMaxRows,
uField1,
uSearchValue
) AS USUAL CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public virtual Usual GetArray(
Usual nMaxRows = default,
Usual uField1 = default,
Usual uSearchValue = default
)
Request Example
View SourceParameters
- nMaxRows (Optional)
- Type: Usual
The maximum number of rows that should be retrieved. If omitted, a maximum of 100 rows are retrieved. - uField1 (Optional)
- Type: Usual
The name, number, or symbol representing the field to be retrieved. If omitted, the first field is retrieved. - uSearchValue (Optional)
- Type: Usual
The value to be searched for, under the currently controlling order. The system performs a Seek() operation, and then proceeds to load up the array from there.
Return Value
Type:
Usual
An array of values found for the specified field, moving sequentially until the specified maximum number of rows or until end of file. If a selection is active, the method includes only records from that selection. The values are retrieved under the current controlling order, if any.
Note that the method does not reposition to the beginning before starting to fill the array. Either provide a start value, or explicitly position the server before using the method. (This allows incremental reading, building up an array in pieces.)
Remarks
Sends a NotifyIntentToMove message before the operation.
Sends a NotifyRecordChange message upon completion, and leaves the server positioned at the last record used or at end of file (last file record).
One use of this method is to populate validation lists in user interfacing.
Examples
The following fills an array with product names for use as validation values, beginning at the indicated product number:
1oDB := DBServer{"products",#Shared,#ReadOnly}
2oDB:SetIndex("prodno")
3aProducts := oDB:GetArray(100,#ProdName, 22750)
4oDB:Close()
See Also