function Tformmain.UpdateUsercardFlag(dsjbh,qh,uphone:string):boolean;//更新用户号码簿中的检查标志
begin
try
with QryTemp do begin
if Active then close;
sql.Clear;
// select dsjbh,qh,uphone,zjtype,uzjsj,checkflag from user_card
sql.Text:='update user_card set checkflag=1 where'
+' dsjbh=:dsjbh and uphone=:phone and qh=:qh';
Parameters.ParamByName('dsjbh').Value:=dsjbh;
Parameters.ParamByName('phone').Value:=uphone;
Parameters.ParamByName('qh').Value:=qh;
ExecSQL;
end;
result:=true;
except
ADOConnection1.Close;
StatusBar1.Panels[2].Text:='更新失败';
sleep(200);
result:=false;
end;
end;