C
cnnoah
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.ADODataSet1AfterOpen(DataSet: TDataSet);
begin
try
ComboBox1.Items.Clear;
while not ADODataSet1.Eof do
begin
ComboBox1.Items.Add(ADODataSet1.Fields[0].AsString);
ADODataSet1.Next;
end;
finally
ADODataSet1.Close;
end;
end;
procedure TForm1.ComboBox1Change(Sender: TObject);
var
WY:String;
begin
WY:=ComboBox1.Text;
ADOQuery1.SQL.Add('select CSWD from txcs where WY='''+WY+'''');
ADOQuery1.Active:=true;
end;
代码如上,为什么comboBox1中选择了数据在dblookupComboBox中没有反应?
编译没有问题
begin
try
ComboBox1.Items.Clear;
while not ADODataSet1.Eof do
begin
ComboBox1.Items.Add(ADODataSet1.Fields[0].AsString);
ADODataSet1.Next;
end;
finally
ADODataSet1.Close;
end;
end;
procedure TForm1.ComboBox1Change(Sender: TObject);
var
WY:String;
begin
WY:=ComboBox1.Text;
ADOQuery1.SQL.Add('select CSWD from txcs where WY='''+WY+'''');
ADOQuery1.Active:=true;
end;
代码如上,为什么comboBox1中选择了数据在dblookupComboBox中没有反应?
编译没有问题