在对一笔资料多次更新时会出现如下提示
Row connot be located for updating.
Some values may have been changed since it was last read

解决方案 »

  1.   

    單表較少出問題,這問題多發生在主從表結構中.
    batchupdate方式下,多次刪除,新增,有可能出現此問題,
    此時,eof=true and bof =true.
    另一個adodataset更改了數據,也會出現此問題. 
    表沒有主鍵,也會出現此問題.
      

  2.   

    我在Adodataset的BeforePost和AfterInsert中有写代码,会不会有影响
      

  3.   

    procedure Tformstoppay.AdostoppayBeforePost(DataSet: TDataSet);
    begin
      adostoppay.FieldByName('operator').asstring:=pubworkname;
      adostoppay.FieldByName('cdate').asstring:=getservertimes;
    end;
      

  4.   

    CursorType := clUseServer
    或者听楼上的,加主建
      

  5.   

    把BeforePost中的两句注释掉,执行看有什么错误。
      

  6.   

    对,把BeforePost中的两句注释掉,执行看有什么错误。看看到底是哪句出的错!
      

  7.   

    在BeforePost事件里更新自身的字段值肯定没有错。
    把你的AfterInsert事件代码贴出来。