TCustomClientDataSet.CloneCursor相关

本文深入探讨了如何通过调用CloneCursor方法实现数据集之间的数据共享,详细阐述了参数Reset和KeepSettings对数据集属性的影响,以及数据操作在两个数据集中的一致性。
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 ,则 属性被清空。

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值