Top Previous Next

Specifies how the upper and lower boundaries for a range should be interpreted.


property KeyExclusive: Boolean;


Use KeyExclusive to specify whether a range includes or excludes the records that match the starting and ending values of the range. By default, KeyExclusive is False meaning that matching values are included.

To restrict a range to those records that are greater than the specified starting value and less than the specified ending value, set KeyExclusive to True.


// Limit the range from 1351 to 1356,
// including 1351 but excluding 1356
with PSQLTable1 do
  // Set the beginning key
  IndexFields[0].AsString := '1351';
  // Include 1351 in the range.
  // Note that KeyExclusive applys to the range start
  // because of the call to EditRangeStart
  KeyExclusive := False;
  // Set the ending key
  IndexFields[0].AsString := '1356';
  // Exclude 1356 from the range
  // Note that KeyExclusive now applys to the range end
  // because of the call to EditRangeEnd
  KeyExclusive := True;
  // Tell the table to establish the range