Delphi Database, Delphi Components from ComponentAce
Products Download Order Contact us
TABSTable.FindNearest
TABSTable
Top 


Moves the cursor to the record that most closely matches a specified set of key values.

procedure FindNearest(const KeyValues: array of const);

Description
Call FindNearest to move the cursor to a specific record in a dataset or to the first record in the dataset that is greater than the values specified in the KeyValues parameter. KeyValues contains a comma-delimited array of field values, called a key. Each value in the key can be a literal, a variable, a null, or nil. If the number of values passed in KeyValues is less than the number of columns in the index used for the search, the missing values are assumed to be null.

The key must always be an index, which can be specified in the IndexName property. If IndexName is empty, FindNearest raises an exception.

FindNearest positions the cursor either on a record that exactly matches the search criteria, or on the first record whose values are greater than those specified in the search criteria. KeyExclusive affects the boundary conditions of ranges and will affect the record selected by FindNearest.
        © 2003 - 2024 ComponentAce  | .net zip component | barcode for .net | delphi zip component | delphi database Apr 19, 2024