Sign in Join
FPDoc Onlineexperiment

TDataSet.IsUniDirectional property

Member of TDataSetpublicIn unit DB

Is the dataset unidirectional (i.e. forward scrolling only).

Declaration

pascal
property IsUniDirectional: Boolean read FIsUniDirectional default False;

Description

IsUniDirectional is True if the dataset is unidirectional. By default it is False, i.e. scrolling backwards is allowed. If the dataset is unidirectional, then any attempt to scroll backwards (using one of Prior or Last), random positioning of the cursor, editing or filtering will result in an EDatabaseError. Unidirectional datasets are also not suitable for display in a grid, as they have only 1 record in memory at any given time: they are only useful for performing an action on all records:

With MyDataset do
  While not EOF do
    begin
    DoSomething;
    Next;
    end;

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.