sql.add('select a.aa,b.bb,c.cc from a,b,c');
open;
first;
while not eof do
begin
combobox1.items.add( );
combobox2.items.add( );
combobox3.items.add( );
next;
end;
sqlText:='select dxxzdm,dxxzmc from jtsjk.dbo.DXXZB where yxdwdm='''+ywqdm+''' order by dxxzdm';
xzMC.Items.Clear;
xzdm.Items.Clear;
xzMC.Items.add('全部');
xzdm.Items.add('1');
tuxedoquery1.sql.clear;
tuxedoquery1.sql.add(sqltext);
try Tuxedoquery1.OPEN;
except
begin
infodlgform.showbox('数据库连接失败!');
exit;
end;
end;
TuxedoQuery1.First;
while not TuxedoQuery1.Eof do
begin
xzMC.Items.Add(TuxedoQuery1.fieldbyname('dxxzmc').asstring);
xzdm.Items.Add(TuxedoQuery1.fieldbyname('dxxzdm').asstring);
Tuxedoquery1.Next;
end;
xzMC.ItemIndex:=0;
xzdm.ItemIndex:=0;
table1.first;
while not table1.eof do
begin
combobox1.items.add(table1.fieldbyname('aaa').asstring);
combobox2.items.add(table1.fieldbyname('aaa').asstring);
combobox3.items.add(table1.fieldbyname('aaa').asstring);