E
eighteenzl
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TYGXXXGform.ComboBox1Change(Sender: TObject);
var i:integer;
a:string;
begin
if ComboBox1.text<>'' then
begin
adoquery1.Close;
adoquery1.SQL.Clear;
a:=combobox1.Text;
adoquery1.SQL.Add('select '+ComboBox1.text+' from 员工基础信息表');
ADOQuery1.Open;
if ADOQuery1.FieldCount>0 then
begin
for i:= 0 to adoquery1.FieldCount-1 do
begin
ComboBox2.Items.Add(ADOQuery1.Fields.FullName);
end;
end;
end;
end;
end.
adoquery1.SQL.Add('select '+ComboBox1.text+' from 员工基础信息表');为何这里是查询全部就行,加个动态的'+ComboBox1.text+'就不行,
是这样提示的ADOQuery1:field'员工编号'not found
请各位指正
var i:integer;
a:string;
begin
if ComboBox1.text<>'' then
begin
adoquery1.Close;
adoquery1.SQL.Clear;
a:=combobox1.Text;
adoquery1.SQL.Add('select '+ComboBox1.text+' from 员工基础信息表');
ADOQuery1.Open;
if ADOQuery1.FieldCount>0 then
begin
for i:= 0 to adoquery1.FieldCount-1 do
begin
ComboBox2.Items.Add(ADOQuery1.Fields.FullName);
end;
end;
end;
end;
end.
adoquery1.SQL.Add('select '+ComboBox1.text+' from 员工基础信息表');为何这里是查询全部就行,加个动态的'+ComboBox1.text+'就不行,
是这样提示的ADOQuery1:field'员工编号'not found
请各位指正