ADOQry.Close;
ADOQry.SQL.Clear ;
设变量:
var tmpname : string;
tmpNum : integer;
sql.text ;= 'select * from table1 where user = '+''''+tmpname+''''; //string
sql.text := 'select * from table1 where user = '+inttostr(tmpNum); //integer
Sdate:=Form1.Cyear.Text+'-'+Form1.Cmon.Text+'-'+Form1.Cday.Text;
s:='Select line,standard,gloztl from TqcZtl Where riqi='+'''%s'''+' order by line ASC';
s:=Format(s,[Sdate]);
ADOQry.SQL.Add(s);
ADOQry.ExecSQL ;
ADOQry.Active:=true;