July 3, 2007 at 11:11 am
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 .
July 3, 2007 at 11:13 am
From SQL BOL "CREATE PROCEDURE"
A stored procedure can have a maximum of 2,100 parameters.
July 3, 2007 at 11:19 am
Thanks
July 4, 2007 at 3:22 am
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.
July 4, 2007 at 12:09 pm
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