我有一个存储过程myproc
需要输入参数@param
请问在DELPHI中的EDIT中的数据如何作为参数传到myproc中呢
有例子最好了

解决方案 »

  1.   

    ADOQuery1.Close;
    ADOQuery1.SQL.Clear;
    ADOQuery1.SQL.Add('Exec MyProc @Param=:MyParam ');
    ADOQuery1.Parameters.ParamByName('MyParam').Value:=Edit1.Text;
    ADOQuery1.ExecSQL;//存储过程不返回数据集时
    //or 
    ADOQuery1.Open;//存储过程返回数据集时
      

  2.   

    再问一下
    我有两个表,用完整性约束来实现COMBOBOX效果
    可是在INSERT数据的时候,为什么会报错:
    Project Project1.exe raised exception class EOleException with message
    '发生未知错误.'.Process stopped.Use Step or Run to continue
    如何解决呢?