Dm.ADO_jilu_Query.Post;
   with DM.ADO_jilu_Query do
    begin
     Close ;
     SQL.Clear ;
     SQL.Add ('update a set a.kehu_bm=b.kehu_no from kehu_dj a,kehu b  ');
     SQL.add('where a.kehu_mc=b.kehu_mc');
    Open ;
    end;

解决方案 »

  1.   

    To:txlicenhe   运行时提示不能得到结果集。
      

  2.   

    直接在SQL中运行如下语句呢?update a set a.kehu_bm=b.kehu_no from kehu_dj a,kehu b  
    where a.kehu_mc=b.kehu_mc
      

  3.   

    To;txlicenhe  行了,能写入库中,但写入后,有时有错误提示。谢谢!
      

  4.   

    update kehu_dj set kehu_bm=b.kehu_no from kehu_dj a,kehu b 
    where a.kehu_mc=b.kehu_mc
      

  5.   

    with DM.ADO_jilu_Query do
        begin
         Close ;
         SQL.Clear ;
         SQL.Add ('update kehu_dj as a set a.kehu_bm=b.kehu_no from kehu as  b');
         SQL.add('where a.kehu_mc=b.kehu_mc');
         exesql;
        end;