TdxMemPersistent.Option Property
Specifies the automatic load mode for data stored in a DFM file.
Declaration
property Option: TdxMemPersistentOption read; write; default poActive;
Property Value
| Type | Default | Description |
|---|---|---|
| TdxMemPersistentOption | poActive | The active automatic data load mode. |
Remarks
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.
Code Example: Delete All Records
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;
Default Value
The Option property’s default value is poActive.
See Also