DbSeek Function | |
Move to the record having the specified key value in the controlling order.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.21
Syntax FUNCTION DbSeek(
uKey,
lSoftSeek,
lLast
) AS LOGIC CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public static bool DbSeek(
Usual uKey = default,
Usual lSoftSeek = default,
Usual lLast = default
)
Request Example
View SourceParameters
- uKey (Optional)
- Type: Usual
Specifies the key value associated with the desired record. - lSoftSeek (Optional)
- Type: Usual
Determines how the work area is positioned if the specified key value is not found: TRUE performs a soft seek; FALSE does not.
If lSoftSeek is omitted, the current SetSoftSeek() setting is used.
- lLast (Optional)
- Type: Usual
TRUE seeks the last occurrence of the specified key value. FALSE, the default, seeks the first occurrence. lLast only applies to CDX indexes.
Return Value
Type:
Logic
TRUE if the specified key value was found; otherwise, FALSE.
Remarks
DBSeek() moves to the first logical record whose key value is equal to
uKey.
If such a record is found, it becomes the current record and DBSeek() returns TRUE.
Otherwise, DBSeek() returns FALSE and the positioning of the work area is as follows: for a normal (not soft) seek, the work area is positioned to LastRec() + 1 and EOF() returns TRUE; for a soft seek, the work area is positioned to the first record whose key value is greater than the specified key value.
If no such record exists, the work area is positioned to LastRec() + 1 and EOF() returns TRUE.
For a work area with no controlling order, DBSeek() has no effect.
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
DBSeek() performs the same function as the SEEK command.
For more information, refer to the SEEK command.
Tip |
---|
Logical records: DBSeek() operates on logical records. Records are processed in controlling order.
If a filter is set, only records which meet the filter condition are considered.
Shared mode: For a shared file, moving to a different record can cause updates to the current record to become visible to other processes.
|
Examples See Also