qqq:='update tablename set a=:b,itemdet=:memo
where itemname=:itemn'
with query1 do
begin
if active then close;
sql.clear;
sql.add();
ParamByName('b').AsString :=b;
ParamByName('memo').AsString :=memo1.Text;
ParamByName('itemn').AsString :=itemn;
ExecSQL;
end;