3.6. Datasets
The components TFDQuery
, TFDTable
, TFDStoredProc
and TFDCommand
are the components for working with data in FireDac. TFDCommand
does not deliver a dataset and, when TFDStoredProc is used with an executable stored procedure, rather than a selectable one, it does not deliver a dataset, either.
TFDQuery
, TFDTable
and TFDStoredProc
are inherited from TFDRdbmsDataSet
.
Apart from datasets for working with the database directly, FireDac also has the TFDMemTable
component for working with in-memory datasets. It is functionally equivalent to TClientDataSet
.
The main component for working with datasets, TFDQuery
, can be used for practically any purpose. The TFDTable
and TFDStoredProc
components are just variants, expanded or reduced to meet differences in functionality. No more will be said about them and we will not be using them in our application. If you wish, you can learn about them in the FireDac documentation.
The purpose of a dataset component is to buffer records retrieved by the SELECT
statement, commonly for displaying in a grid and providing for the current record in the buffer (grid) to be editable. Unlike the IBX TIBDataSet
component, TFDQuery
component does not have the properties RefreshSQL
, InsertSQL
, UpdateSQL
and DeleteSQL
. Instead, a separate TFDUpdateSQL
object specifies the statement for dataset modifications and the dataset component carries a reference to that component in its UpdateObject
property.
RequestLive Property Sometimes it is possible to make an |