把其中一个QUERY的DATASOURCE设置成另外一个QUERY即可!

解决方案 »

  1.   

    update tablename set fieldname=' '
      where fieldname2 in (select ........)
      

  2.   

    with query1 do
    begin 
      close;
      sql.clear;
      requestlive:=true;
      sql.add('select * from table where field=条件');
      open;
      //you can :dsEdit,dsInsert,delete record.
      
    end;
      

  3.   

    可以调用ApplyUpdate,但应该在TdataSetProvider的BeforeUpdateRcord事件中处理以将数据写入数据库。
    方法:加入3个UpdateSQL,将要更新的数据付给UpdateSQL,分别执行后将事件处理的Applied := True;
    当然,将数据写入UpdateSQL有点儿复杂,但是舍不得老婆又怎么抓得到色狼呢?