Friday, January 4, 2013

Procedure or function has too many arguments specified

This is the error I got when I had Gridview bind with SqlDataSource.
Very hard to track this error if u dont have mismatch parameters.

Things to check when get this error:
  1. Check all spellings for all parameters.
  2. Check parameters defined in Stored Procedure
  3. If DataKeyNames parameter is set for Gridview, then the Stored Procedure must have the same parameter in its parameter list.
Thanks,