FireDAC.Comp.Client.TFDCustomLocalSQL.DataSets

From RAD Studio API Documentation
Jump to: navigation, search

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

Delphi

property DataSets: TFDLocalSQLDataSets read FDataSets write SetDataSets stored False;

C++

__property TFDLocalSQLDataSets* DataSets = {read=FDataSets, write=SetDataSets, stored=false};

Description

Collection of the registered datasets.

Use the DataSets collection property to manage the datasets registered with this Local SQL engine.

You can add FireDAC datasets to the collection implicitly, by setting the LocalSQL property. You can add non-FireDAC and FireDAC datasets explicitly by adding new items to the DataSets collection. To remove a dataset from the list of registered datasets, remove the corresponding item from the DataSets collection. You can add or remove datasets both at design time and at run time.

All datasets in the collection must have unique names. When an item's Name property is specified, then it is used as a dataset name. If not specified, then a TDataSet.Name value is used.

Example

ADLocalSQL1.DataSets.Add.DataSet := ADOQuery1;
ADLocalSQL1.DataSets.Add.DataSet := ADOQuery2;
ADQuery1.LocalSQL := ADLocalSQL1;
ADQuery2.LocalSQL := ADLocalSQL1;

See Also