case combobox2.Text of ^^^^^^^^^^^^^^^^^^^^^^^ 察看Case的用法,Case不能Of字符串,只能是 Case ... Of 0:// 1:// end;
----------------------------------------------
维护世界和平,共创美好盒子。
但是,我这样也不行.请指教!!!!!! procedure TForm1.Button1Click(Sender: TObject); begin adoquery1.Close; adoquery1.SQL.Clear; adoquery1.SQL.add('select hi from ch'); if combobox2.Text='大于' then begin adoquery1.sql.Add('where "combobox1.text">'+edit1.text); adoquery1.Prepared; adoquery1.Open; end else if combobox2.text='等于' then begin adoquery1.sql.Add('where combobox1.text='+edit1.text); adoquery1.Prepared; adoquery1.ExecSQL; adoquery1.Open; end else if combobox2.text='小于'then begin adoquery1.sql.Add('where "combobox1.text"<'+edit1.text); adoquery1.Prepared; adoquery1.ExecSQL; adoquery1.Open; end; end; end. 感激不尽!!!!!!
----------------------------------------------
-