mysql.data Incorrect number of arguments for PROCEDURE

The following error occurred while using the MySQL Connector for ASP.NET:

mysql.data Incorrect number of arguments for PROCEDURE 'stored procedure name' expected 3 got 2

Checking the stored procedure and the C# code executing it the number of parameters matched up. When checking the parameter list in the stored procedure though the problem was identified:

in param1 int, in param2 varchar (100), in param3 int

Although the stored procedure was created without any errors there is a syntax error as there is an unnecessary space between ‘varchar’ and ‘(100)’. Removing the space solved the problem:

in param1 int, in param2 varchar(100), in param3 int
This entry was posted in Programming and tagged , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

*
*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

* = Required