怎么样比较两个数据表中的所有数据是否相同,用什么函数?

解决方案 »

  1.   

    用comparestr
    逐个比较每个字段!
      

  2.   

    不是很复杂的,只是循环而已
    var
      i:integer;
      b:boolean;
    begin
    ......
    b:=true;
    adoquery1.open;
    adoquery2.open;
    while (not adoquery1.eof) and b do
      begin
        for  i:=0 to adoquery1.FieldCount-1 do
          if adoqWeb.Fields[i].Value <>adoquery2.FieldByName(adoquery1.Fields [i].FieldName).Value then b:=false
        adoquery1.next;
        adoquery2.next
      end;
    if b=false then showmessage('数据不同') else showmessage('数据相同')
    end;
      

  3.   

    tongban铜板,我怎么给分给你?