新系统查询是否有信息修改记录

  qry:=TADOQuery.Create(nil);
    
try
       lblXxxg.Caption:
='';
       lblXxxgSfzh.Caption:
='';
       lblXxxg.visible:
=false;
       lblXxxgSfzh.Visible:
=false;
        qry.Connection:
=connPrtvu;
        qry.sql.text:
='select sfzh,xm,nd,xqdm,ylsfzh,ylxm from xsxxgdb where xh='+''''+qryXJplus.fieldbyname('xh').asstring+'''';
        qry.open;
        
if (qry.RecordCount>0)  then
        
with qry do
            
begin
             lblXxxg.visible:
=true;
             lblXxxg.Caption:
=qry.fieldbyname('nd').AsString+'Äê'+ fieldbyname('xqdm').AsString+'ѧÆÚÓÐÐÞ¸Ä:';
             lblXxxgSfzh.Visible:
=True;
             
if (FieldValues['ylsfzh']<> null) and (FieldValues['sfzh']<> null) then
             lblXxxgSfzh.caption:
=Trim(fieldbyname('ylsfzh').AsString);
             
if (FieldValues['ylxm'<>null) and (FieldValues['xm'<>null) then
             lblXxxgSfzh.caption:
=lblXxxgSfzh.caption+Trim(fieldbyname('ylxm').AsString);
           
end;
    
finally
       qry.Close;
       qry.Free;
    
end;
判断是否有信息修改,根据ylsfzh,ylxm与sfzh,xm对比可以查询。。。如果两者都不空,表示有修改。
posted @ 2011-06-23 16:28  步三少  阅读(276)  评论(0编辑  收藏  举报