写在什么事件里!主表的afterpost吗??

解决方案 »

  1.   

    两个Query用同一个DataBase,
      Database1.StartTransaction;
        try
          Query1...
          query2...
          Database1.Commit; {on success, commit the changes};
        except
          Database1.Rollback; {on failure, undo the changes};
        raise; {raise the exception to prevent a call to CommitUpdates!}
        end;
      CommitUpdates; {on success, clear the cache}
      

  2.   

    liang_z说的道理我也明白!!
    但是我使用DBGRID接的呀!用户是可以点击导航条删除的!
    这个事件应该在beforpost中删除!!
    要不就是专门定义数据集用来做更新!