vcl-dxmdaset-dot-tdxmempersistent.md
Specifies the automatic load mode for data stored in a DFM file.
property Option: TdxMemPersistentOption read; write; default poActive;
| Type | Default | Description |
|---|---|---|
| TdxMemPersistentOption | poActive |
The active automatic data load mode.
|
A TdxMemData component automatically loads data stored in a DFM file when you call the component’s Open procedure or set the Active property to True.
You can set the Option property to poNone or poLoad to populate the memory-based dataset with data stored in a DFM file on demand or at application startup, respectively.
Refer to the TdxMemPersistentOption type description for detailed information on all available options.
The following code example deletes all records stored in a memory-based dataset:
if dxMemData1.Persistent.Option = poActive then
dxMemData1.Persistent.Option := poNone;
dxMemData1.Close;
dxMemData1.Open;
if(dxMemData1->Persistent->Option == poActive)
dxMemData1->Persistent->Option = poNone;
dxMemData1->Close();
dxMemData1->Open();
The Option property’s default value is poActive.
See Also