现在的位置: 首页 > 综合 > 正文

TCustomClientDataSet.CloneCursor相关

2013年09月09日 ⁄ 综合 ⁄ 共 1708字 ⁄ 字号 评论关闭

TCustomClientDataSet.CloneCursor相关

来源:http://hi.baidu.com/davidjkl/blog/item/bc57f035e23e259ca71e1221.html

Shares the data belonging to another client dataset. 

【共用属于另一个cds的数据。】

procedure CloneCursor(Source :TCustomClientDataSet; Reset: Boolean; KeepSettings: Boolean = False); virtual;

 

Description

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.

【Reset 和 KeepSettings 都是False ,则 上面的所有属性都要设置成与源数据集相同。】

If Reset is True, the properties listed above are all cleared.

【Reset为True ,则上面的所有属性清空。】

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.

【Reset为False 且 KeepSettings 为True,上面的所有属性不变。这种情况下,.......】

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.

【数据操作对于两个cds的作用相同。】

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.

 

总结:

(1)Reset 和 KeepSettings 都是False ,则 上面的所有属性都要设置成与源数据集相同。  不重置但是

(2)Reset为True ,则上面的所有属性清空。

(3)Reset为False 且 KeepSettings 为True,上面的所有属性不变。这种情况下,.......

(4)数据操作对于两个cds的作用相同。

只要Reset 为True ,则 属性被清空。

抱歉!评论已关闭.