Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'Procedure or function has too many arguments specified

Status
Not open for further replies.

mrp9090

Programmer
May 22, 2006
71
GB
I am using a SqlDataSource with a GridView and stored proc, and I have specified exactly the same update parameters for the SqlDataSource in exactly the same order as my stored proc. Yet I keep getting the error 'Procedure or function <stored procedure name> has too many arguments specified'. Has anybody else come across this, and if so how do you prevent this annoying error?
 
hmm, tihs could happen when the parameters that u send and the parameters of the SP dont match (this is an inbuilt feature of Enterprise Library)...

Known is handfull, Unknown is worldfull
 
There must be more arguments being passed to your SP than it is expecting. This may be down to something that is being generated from the SqlDataSource or by some manual parameters that you have added - either way, you'll have to look at which parameter's are being passed and work it out from there.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
The only thing that I could think of was that I am not explicitly passing the DataKey field to the stored proc, and maybe it is getting passed automatically without me knowing. But I have tried to explicitly pass it and it still gives me the same error.
 
>> that I am not explicitly passing the DataKey field to the stored proc

DataKey field? could u clarify a bit???

Known is handfull, Unknown is worldfull
 
How about showing the pramaters for your SP, and the sql data source code.
 
I meant that I was setting DataKeyNames in my GridView that is linked to the SqlDataSource.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top