在delphi中如何判断ado的存储过程返回的客户端修改且未保存的记录。就是说返回10条记录,我只修改3条记录,在保存我如何知道哪3条修改了,保存时将这3条记录保存到变更表中。

解决方案 »

  1.   

    如果是三层结构,Delphi提供的组件是这个做的。
      

  2.   

    with ADOTbl_1 do
            if Recordstatus=[rsModified] then
              
            else if Recordstatus=[rsNew] then
              
            else if Recordstatus=[rsConcurrencyViolation] then
    但是我的没有成功,老是rsConcurrencyViolation,正在进一步探索中。
    严重关注!
      

  3.   

    ADO好像必須在cacheupdate(BatchOptimistic)下才可以;
      with ADOTbl_1 do
            if Recordstatus=[rsModified] then
              
            else if Recordstatus=[rsNew] then
              
            else if Recordstatus=[rsConcurrencyViolation] then
    我沒是過,但看過李維的書,有點印象.
      

  4.   

    它好象有两个属性:oldvalue,newvalue
    判断一下它们是否改变了没有