adoS.Parameters.CreateParameter('kkk',ftInteger,pdInput,0,1);//括号里面五个参数的意思能具体解释下吗?  adoS := TADOStoredProc.Create(nil);    //////设置存储过程的参数
    adoS.Connection := dModule.adoConn1;
    adoS.ProcedureName := 'queryprop';    ///填充仓库清单
    adoS.Parameters.CreateParameter('kkk',ftInteger,pdInput,0,1);
    adoS.Open;
    if adoS.RecordCount > 0 then
        while not adoS.Eof do
        begin
        cbStock.Items.Add(adoS.fieldbyname('username').AsString);
        adoS.Next;
        end;
    adoS.Close;

解决方案 »

  1.   

    把鼠标放在CreateParameter 上  按F1 看有效果吗 ?
      

  2.   

    Delphi syntax:function CreateParameter(const Name: WideString; DataType: TDataType; Direction: TParameterDirection; Size: Integer; Value: OleVariant): TParameter;DescriptionCall CreateParameter to create a single TParameter object and add it to the TParameters collection. Property values for the newly added TParameter object are supplied via CreateParameter parameters.Name is a WideString value containing the name of the newly created TParameter object.DataType is a TDataType value indicating the data type of the parameter the new TParameter object represents.Direction is a TParameterDirection value indicating the parameter type. A parameter represented by a TParameter may be any one of: input, output, input-output, return value. Designate a parameter as unknown if the parameter type is not know at the time the TParameter is created.Size indicates the maximum size of the parameter value.Value is an OleVariant containing the parameter抯 value. A value need not be passed for Value when the TParameter is created. It can be assigned later. If no value is assigned at this time, pass a nil (Delphi) or NULL (C++) for Value.ADOStoredProc1.CreateParameter('Parm1', ftString, pdInput, 10, nil);