偶尔看见的,可能将来会用到 这里保存下,将来有时间再整理下

基本上 , 把locktype 设置为ltBatchOptimistic可以帮到你.

不过你最好审视一下你的程序逻辑,为什么不可以在查询的时候就用条件过滤了不要的记录?

ltUnspecified A specific lock type has not been specified or determined.(未指定)
ltReadOnly Read-only; the current execution cannot modify data.(只读)
ltPessimistic Pessimistic locks; locks instantiated on a record-by-record basis when edit mode is applied to a record.(悲观锁定,当记录进入dsEdit状态就锁定数据库)
ltOptimistic Optimistic locks; locked are initiated on a record-by-record basis, but only when updates are applied and a record is being updated.(乐观锁定,只在提交的时候试图锁定记录)
ltBatchOptimistic Optimistic batch updates; used for batch update mode rather than immediate update mode.(对记录集的修改批量缓存,暂时不反映到数据库) 

 

posted on 2011-11-25 16:32  del88  阅读(36)  评论(0)    收藏  举报