VirtualDAC

TVirtualDataSet Class

A class for representation of arbitrary data in tabular form.

For a list of all members of this type, see TVirtualDataSet members.

Unit

VirtualDataSet

Syntax

TVirtualDataSet = class(TCustomVirtualDataSet);

Remarks

TVirtualDataSet is inherited from the TMemDataSet component. TVirtualDataSet does not store data in memory and interacts with data using event handlers. It can be used to represent of arbitrary data (arrays, lists etc.) in tabular form, for example, to visualize the data using data-aware controls.

Immediately after creating, a virtual dataset will be empty. Then you define new fields at design time using Fields Editor, so that the virtual dataset object becomes initialized and ready to be opened. When opening, the virtual dataset queries the number of rows, using a TVirtualDataSet.OnGetRecordCount event handler. Then the virtual dataset asks for the value of each field, using a TVirtualDataSet.OnGetFieldValue event handler.

When modifying records, the virtual dataset projects corresponding changes via TVirtualDataSet.OnInsertRecord, TVirtualDataSet.OnModifyRecord and TVirtualDataSet.OnDeleteRecord events.

When you close the virtual dataset it will discard its record set.

Note: TVirtualDataSet component is added to the Data Access page of the component palette, not to the VirtualDAC page.

Inheritance Hierarchy

TMemDataSet
   TCustomVirtualDataSet
      TVirtualDataSet

See Also

© 1997-2021 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback