delphi combobox 数据显示问题
程序运行正常,但是ADOQUERY1里面不显示数据(选择COMBOBOX里的选项跳出相关数据)procedureTForm1.ComboBox1Change(Sender...
程序运行正常,但是ADOQUERY1 里面不显示数据(选择COMBOBOX里的选项 跳 出相关数据)
procedure TForm1.ComboBox1Change(Sender: TObject);
BEGIN
with adoquery1 do
begin
close;
ADOquery1.close;
if combobox1.text='MC' then
ADOquery1.sql.text:='select MC from HYCPBHG where MC='''+combobox1.text+'''';
if combobox1.text='BH' then
ADOquery1.sql.text:='select BH from HYCPBHG where BH='''+combobox1.text+'''' ;
ADOquery1.open;
END;
END;
END. 展开
procedure TForm1.ComboBox1Change(Sender: TObject);
BEGIN
with adoquery1 do
begin
close;
ADOquery1.close;
if combobox1.text='MC' then
ADOquery1.sql.text:='select MC from HYCPBHG where MC='''+combobox1.text+'''';
if combobox1.text='BH' then
ADOquery1.sql.text:='select BH from HYCPBHG where BH='''+combobox1.text+'''' ;
ADOquery1.open;
END;
END;
END. 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询