with ADOQuery1 do
begin
Close;
SQL.Clear;
SQLstr:='Select * From'+ListBox1.Items[ListBox1.Itemindex];
SQL.Add(SQLstr);
open;
ADOQuery1.Active:=True;
Combobox1.Items.Clear;
end;配置完后,我需不需要到adoquery1中在sql属性中把sql语句填入呢?因为我看到ADO前面有个问号
begin
Close;
SQL.Clear;
SQLstr:='Select * From'+ListBox1.Items[ListBox1.Itemindex];
SQL.Add(SQLstr);
open;
ADOQuery1.Active:=True;
Combobox1.Items.Clear;
end;配置完后,我需不需要到adoquery1中在sql属性中把sql语句填入呢?因为我看到ADO前面有个问号
2、修改
with ADOQuery1 do
begin
Close;
SQL.Clear;
SQLstr:= 'Select * From '+ListBox1.Items[ListBox1.Itemindex];
SQL.Add(SQLstr);
open;
// ADOQuery1.Active:=True;
Combobox1.Items.Clear;
end;
3、SQLstr:= 'Select * From '+ListBox1.Items[ListBox1.Itemindex]; 是单引号
如果你创建adoquery1时不用初始值就不用给它一个查询语句
SQL.Add(SQLstr);
你在语句中不是填了吗,既然是动态的添加,就不需要在属性中添加