FireDAC.Comp.DataSet.TFDDataSet.Table

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type: property
Visibility: public
Source:
FireDAC.Comp.DataSet.pas
FireDAC.Comp.DataSet.hpp
Unit: FireDAC.Comp.DataSet
Parent: TFDDataSet

Delphi

property Table: TFDDatSTable read FTable;

C++

__property Firedac::Dats::TFDDatSTable* Table = {read=FTable};

Description

Specifies the reference to the DatS table object, representing the internal data storage.

The Table property returns a reference to the TFDDatSTable object. It is the internal data storage containing all dataset rows. 

FireDAC creates a table for each dataset automatically when Open is called. TFDCustomMemTable allows to attach the existing table before Open is called, by using the AttachTable method. If the table was automatically created, then it will be destroyed after the dataset is closed. 

As a result of applying filters, indexes, and ranges, FireDAC builds views for this table object. All dataset navigation methods use SourceView view objects to get access to the table rows.

Example

var
  i: Integer;
....
// delete all rows, where ID = 100, without navigating through dataset
for i := FDQuery1.Table.Rows.Count - 1 downto 0 do
  if FDQuery1.Table.Rows[i].GetData('id') = 100 then
    FDQuery1.Table.Rows[i].Delete;
FDQuery1.Resync([]);

See Also