with adoquery1 do begin close; sql.Text:='select :p1, :p2 from a where v1=:p3 and v2=:p4'; with Parameters do begin ParamValues['p1']:=值; ParamValues['p2']:=值; ParamValues['p3']:=值; ParamValues['p4']:=值; end; edit1.text:=sql.text;{赋值后的SQL语句} open; end;
你可以在mssql的性能监视器里面看到他。
with adoquery1 do begin
close;
sql.Text:='select :p1, :p2 from a where v1=:p3 and v2=:p4';
with Parameters do begin
ParamValues['p1']:=值;
ParamValues['p2']:=值;
ParamValues['p3']:=值;
ParamValues['p4']:=值;
end;
edit1.text:=sql.text;{赋值后的SQL语句}
open;
end;
不好意思,说错了,让 zhouzuoji 嘲笑了:(