Show: Delphi C++
Display Preferences

Bde.DBTables.TTable.SetRange

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure SetRange(const StartValues, EndValues: array of const);

C++

void __fastcall SetRange(const System::TVarRec *StartValues, const int StartValues_High, const System::TVarRec *EndValues, const int EndValues_High);

Properties

Type Visibility Source Unit Parent
procedure
function
public
Bde.DBTables.pas
Bde.DBTables.hpp
Bde.DBTables TTable

Description

Sets the starting and ending values of a range, and applies it.

Call SetRange to specify a range and apply it to the dataset. The new range replaces the currently applied range, if any.

StartValues indicates the field values that designate the first record in the range. StartValues_Size specifies the index of the last value in StartValues (one less than the total number of values).

EndValues indicates the field values that designate the last record in the range. EndValues_Size specifies the index of the last value in EndValues (one less than the total number of values).

SetRange combines the functionality of SetRangeStart, SetRangeEnd, and ApplyRange in a single procedure call. SetRange performs the following functions:

  1. Puts the dataset into dsSetKey state.
  2. Erases any previously specified starting range values and ending range values.
  3. Sets the start and end range values.
  4. Applies the range to the dataset.

If either StartValues or EndValues has fewer elements than the number of fields in the current index, then the remaining entries are set to NULL.

After a call to SetRange, the cursor is left on the first record in the range. However, if two calls to SetRange are made in succession with the same parameters, the second internal call is optimized away.


Note: With Paradox or dBASE tables, SetRange works only on indexed fields. With SQL databases, SetRange also works with any columns specified in the IndexFieldNames property.

See Also

Code Examples


Personal tools
In Other Languages
Previous Versions
Assistance