C cm Unregistered / Unconfirmed GUEST, unregistred user! 2001-04-02 #2 什么意思 是不是想问如何进行带参数的字符串查询 select * from table where field1=:string_parameter
L LanFairy Unregistered / Unconfirmed GUEST, unregistred user! 2001-04-02 #3 with Query1 do begin SQL.Text := 'Select * from 表名 as a where a."字段名"=:b'; ParamByName('b').AsInteger := 1; Open; end;
with Query1 do begin SQL.Text := 'Select * from 表名 as a where a."字段名"=:b'; ParamByName('b').AsInteger := 1; Open; end;
Z zhangkan Unregistered / Unconfirmed GUEST, unregistred user! 2001-04-02 #4 Query1.Active:=False; Query1.SQL.Clear; Query1.SQL.Add(select * from yourtable where field=:aa); query1.params[0].asstring:='youwant'; Query1.Open; Query1.Active:=True;
Query1.Active:=False; Query1.SQL.Clear; Query1.SQL.Add(select * from yourtable where field=:aa); query1.params[0].asstring:='youwant'; Query1.Open; Query1.Active:=True;
H han Unregistered / Unconfirmed GUEST, unregistred user! 2001-04-02 #5 何必这么复杂? 假设参数在Edit1.Text中。 Query.SQL.Text := Format('select * from table1 where id=%s',[Edit1.Text]);