FireDAC.Stan.Option.TFDResourceOptions.Persistent

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Persistent: Boolean read GetPersistent write SetPersistent  stored IsPS default False;

C++

__property bool Persistent = {read=GetPersistent, write=SetPersistent, stored=IsPS, default=0};

Properties

Type Visibility Source Unit Parent
property published
FireDAC.Stan.Option.pas
FireDAC.Stan.Option.hpp
FireDAC.Stan.Option TFDResourceOptions

Description

Controls the dataset persistence.

Use the Persistent property to control the dataset persistence. By default, it is set to False.  If it is set to True, the dataset will load its content from a data file at the call to Open and it will save the data to a data file at the call to Close. The dataset will load data if PersistentFileName is not empty and the file exists. A dataset will save data if PersistentFileName is not empty, the file does not exists, or the data was changed after the call to Open

A special case is represented by TFDCustomMemTable. If PersistentFileName is empty, then the dataset will save/load data from the DFM. So, to save in-memory table content at design time to a DFM file, set Persistent to True and clear PersistentFileName.

See Also