Bug #44828 Stored procedure fails with .NET
Submitted: 12 May 2009 15:15 Modified: 20 Jun 2009 6:43
Reporter: Luigi Bongini Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:5.1.32 Connector 5.2 OS:Windows (XP)
Assigned to: Assigned Account CPU Architecture:Any
Tags: .net, connector, stored procedure

[12 May 2009 15:15] Luigi Bongini
Description:
The stored procedure works fine when called from the Mysql client but fails when called from a .NET application. Specifically it fails in doing an insert in a VARCHAR(255) field. See Private comment. We get an exception for the fourth parameter: "the stored procedure has 4 params but only three specified"

The last one being the VARCHAR(255), we tried with a smaller VARCHAR but nothing happened

stored procedure in private comment

How to repeat:
let us know if running the code works....:-)
[20 May 2009 6:43] Tonci Grgin
Hi Luigi and thanks for your report.

What happens if you're using "AddWithValue" function like this:
      cmd.CommandType = CommandType.StoredProcedure;
      cmd.Parameters.AddWithValue("?valin", 22);
      cmd.Parameters[0].DbType = DbType.Int32;
      cmd.Parameters[0].Direction = ParameterDirection.Input;
...
[20 Jun 2009 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".