由于关联了其它的表,使用了TUpdateSQL。
如果没有关联。就可以。

解决方案 »

  1.   

    1个Tubpdatesql只能更新一个特定的表
    如果你修改的不是Tupdatesql中指定的表当然不能保存
    多个表用多个Updatesql
      

  2.   

    我修改的是updatesql指定的表,也不能进行修改.
      

  3.   

    好像和cachedupdate属性有关,如果单个表,将Cacheupdate设为TRUE,也不能自动保存。
    将cacheupdate改为FALSE就会自动激活。而多个表关联时,将Cacheupdate设为false,有不能进行修改。
      

  4.   

    多个表!肯定和一般的不一样啦。一个个的POST吧。
      

  5.   

    将Cacheupdate设置为True,然后用这种方式提交
    procedure TForm1.ApplyButtonClick(Sender: TObject);begin
      with CustomerQuery do
      begin
      Database1.StartTransaction;
        try
          ApplyUpdates; {try to write the updates to the database};
          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}
      end;end;
      

  6.   

    好像不能满足我的要求,那样的话不是要放一个按钮了,dbgrid的onmousedown事件怎么不能激活
      

  7.   

    ljmanage(过客) 的详细。一般不能保存的问题是关联了表,想想如果有两个表query不知道都更新的那个表里去,这种情况,你调用post还出错dbgrid可以增加数据,如果数据不多,录入不频繁。反正不太好控制,我以前做了个
    一个grid更新好多表,因为有好多地方比如显示是'是、否'表里是'1、0'写了好多代码