请看这段代码:
procedure TForm2.SpeedButton6Click(Sender: TObject);
var
str: string;
begin
AdoQuery1.Active:=false;
AdoQuery1.SQL.Clear;
str:=ComboBox1.text;
if str<>null then
begin
AdoQuery1.SQL.Add('select * from 基本档案 where str='''+
edit1.Text+'''');
AdoQuery1.Active:=true;
end;
end;
ComboBox1.items是我的表中的一些字段,我是先把ComboBox1.text给str
然后当str等于edit1.text时实现查询。当程序运行的时候,我一点查询按钮
就出现“参数str没有默认值”的异常。该怎样解决这个问题了,请各位
指教。
procedure TForm2.SpeedButton6Click(Sender: TObject);
var
str: string;
begin
AdoQuery1.Active:=false;
AdoQuery1.SQL.Clear;
str:=ComboBox1.text;
if str<>null then
begin
AdoQuery1.SQL.Add('select * from 基本档案 where str='''+
edit1.Text+'''');
AdoQuery1.Active:=true;
end;
end;
ComboBox1.items是我的表中的一些字段,我是先把ComboBox1.text给str
然后当str等于edit1.text时实现查询。当程序运行的时候,我一点查询按钮
就出现“参数str没有默认值”的异常。该怎样解决这个问题了,请各位
指教。
edit1.Text+'''');