Datasnap.DBClient.TCustomClientDataSet.CloneCursor
Delphi
procedure CloneCursor(Source: TCustomClientDataSet; Reset: Boolean; KeepSettings: Boolean = False); virtual;
C++
virtual void __fastcall CloneCursor(TCustomClientDataSet* Source, bool Reset, bool KeepSettings = false);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | Datasnap.DBClient.pas Datasnap.DBClient.hpp |
Datasnap.DBClient | TCustomClientDataSet |
Description
Shares the data belonging to another client dataset.
Call CloneCursor to share the data belonging to another client dataset. Source indicates another client dataset whose data is to be shared.
Reset
and KeepSettings
determine how to set the values of the following properties and events:
- Filter, Filtered, FilterOptions, and OnFilterRecord
- IndexName
- MasterSource and MasterFields
- ReadOnly
- RemoteServer and ProviderName
If Reset
and KeepSettings
are both False, the values of the properties listed above are all set to match the source dataset.
If Reset
is True, the properties listed above are all cleared.
If Reset
is False and KeepSettings
is True, the properties listed above are not changed. In this case, the application must ensure that existing indexes, providers, and so on are compatible with the cloned data.
After calling CloneCursor, the data for the client dataset is the same as the data for Source. Edits performed by either client dataset are reflected in the data of both datasets.
Note: Because cloned cursors are shared, changing properties that affect the cursor affect both datasets. For example, setting the ReadOnly property of either dataset will make both datasets read-only.
See Also
Code Examples