Is There a limitation on the number of Paramters that a Stored Procedure Can Accept

  • Is There a limitation on the number of Paramters that a Stored Procedure Can Accept

     

    I am working with .NET 2005 and I am Trying to send 38 Paramters to a Stored Procedure

    I am getting an exception for  32 PAramter (counting from 1) , the stored procedure expects the patmeter name which was not suplied .

  • From SQL BOL "CREATE PROCEDURE"

    A stored procedure can have a maximum of 2,100 parameters.

  • Thanks

  • It probably means that you supply less parameters than what was defined for the procedure. This is possible only if the missing parameters have a default defined.

    Also, especially if you don't supply all parameters, pass the parameters in form @name = value (not just the value).

    Post the procedure (at least the beginning of it, where parameters are defined) and the call, if you still have problems.

  • Check your stored procedure for required vs. optional parameters.  Any parameter that does not have a default value assigned requires that the parameter be "filled in"

    For example:

    create procedure uspSampleProc

    @requiredparameter varchar(100),

    @optionalparameter varchar(100) = 'abcdefg'

    any parameter without the = value is required and must be passed...

    Joe

     

     

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply