select id ,day form table where id:=trim(edit1.text); if query1.recordcount=1 then edit2.text:=query1.fieldbyname('day').asstring;
edit1 的onchange 里写:query1.sql.text:='select id ,day form table where id:='+''''+trim(edit1.text)+''''; query1.open; if query1.recordcount=1 then edit2.text:=query1.fieldbyname('day').asstring;
if query1.recordcount=1 then edit2.text:=query1.fieldbyname('day').asstring;
query1.open;
if query1.recordcount=1 then
edit2.text:=query1.fieldbyname('day').asstring;