如何:
Usbm:='你的设备名';
with query1 do
begin
sql.clear;
sql.add('select * from Utable where sbm=:sbm');
paramsbyname('sbm').asstring:=Usbm;
open;
end;
if query1.recordcount>0 then
begin
Urecordcount:=query1.recordcount;
query1.first;
Utable.locate('sbm',query1['sbm'],[]);
end;