我自定义了一个函数,在ComboBox中输入数据,存到表Comp_Pipe_Name的Pipe_Name字段中,存之前想判断一个数据库表里是否里已经存过这个记录,如没存过再存入。
procedure TInputDlg.ComboBox1Exit(Sender: TObject);
begin
  Result := True;
  with DataModule1.ADOquery1 do
  begin
    close;
    sql.clear;
    sql.add('select * from Comp_Pipe_Name where field =:Pipe_Name');
    parameters.ParamByName('Pipe_Name').value:=combobox1.text;
    open;
  end;
  if DataModule1.ADOquery1.recordcount>0 then
  begin
    Application.messagebox('已经输入过此数据','提示',0+mb_iconquestion)  ;
    combobox1.setfocus;
    combobox1.text:='';
    Result := False;
  end;
  
end;
在主程序调用它
begin
    if InputDlg.ShowModal = mrok then
    begin
      Close;
      SQL.Clear;
      with DataModule1.ADOQuery1 do
      begin
        if InputDlg.ComboBox1Exit then-----------------------感觉这里有问题
        begin
          SQL.Add('Insert Comp_Pipe_Name(Pipe_Name) Values(:a)');
          Parameters.ParamByName('a').value:= InputDlg.ComboBox1.Text;
        end;
    end;
end;
编译出错:
[Error] digitizer_main.pas(295): Not enough actual parameters
请问你什么回事呢?