VirtualDAC

TCustomDADataSet.CloneCursor Method

Shares data from another dataset.

Class

TCustomDADataSet

Syntax

procedure CloneCursor(Source: TMemDataSet; Reset: boolean = False; KeepSettings: boolean = False); override;

Parameters
Source
Specifies the dataset whose data will be shared.
Reset
Defines how to set values for such events and properties: Filter, Filtered, FilterOptions, and OnFilterRecord; IndexName; MasterSource and MasterFields; ReadOnly; RemoteServer and ProviderName. If Reset is True, the properties are all set to their default values.
KeepSettings
Outlines how to assign values for the same events and properties as those of the Reset parameter.

Remarks

Call CloneCursor to provide a dataset with data from another dataset. After calling the method, the internal data storage is identical to both datasets.

If Reset and KeepSettings are False, the values of the properties are configured to match the source dataset. If Reset is False and KeepSettings is True, the properties remain unmodified. In this scenario, the application needs to verify that the current indexes, filters, and related settings are consistent with the cloned data.

The CloneCursor method has the following restrictions:

* When the source dataset is closed, all cloned datasets will be closed too.

* The cloned dataset will have the read-only status.

* The source dataset must not be UniDirectional.

* It's not allowed to clone a dataset from another thread as the behavior will be undefined.

* Filter and IndexFieldNames must not be used in the cloned dataset.

* Applying Filter and/or IndexFieldNames in the source dataset will affect the contents of the cloned datasets.

© 1997-2024 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback