例如只使用adoQuery1和DataSource1
但是用了DBGrid1、DBGrid2
來顯示2個select
adoQuery1.Close;   adoQuery1.sql.clear;
adoQuery1.SQL.Add('select * from a where cv =' + Quotedstr(Edit1.text) + ' and acode like ' + QuotedStr(Edit2.Text + '%'));
adoConnection1.Connected:=true;
adoQuery1.Open;
DBGrid1.DataSource:=DataSource1;adoQuery1.Close;   adoQuery1.sql.clear;
adoQuery1.SQL.Add('select * from Saw where cv =' + Quotedstr(Edit1.text) + ' and code like ' + QuotedStr(Edit2.Text + '%'));
adoConnection1.Connected:=true;
adoQuery1.Open;
DBGrid2.DataSource:=DataSource1;
小弟我試了半天還是不行,只要adoQuery一Close
DBGrid就空白了
請各位指教