Bug #25029 | Comments in Stored Procedure param list | ||
---|---|---|---|
Submitted: | 13 Dec 2006 8:25 | Modified: | 14 Dec 2006 10:20 |
Reporter: | Pavel Savenkov | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / NET | Severity: | S3 (Non-critical) |
Version: | 1.0.7.30072 | OS: | Windows (Windows XP) |
Assigned to: | CPU Architecture: | Any | |
Tags: | stored procedure |
[13 Dec 2006 8:25]
Pavel Savenkov
[13 Dec 2006 8:27]
Pavel Savenkov
//C# file definition using System; using System.Collections.Generic; using System.Text; using MySql.Data.MySqlClient; using System.Data; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { MySqlConnection cnn = new MySqlConnection("server='localhost';port=3306;uid='root';pwd='12345';database='test';"); MySqlCommand cmd = new MySqlCommand("FailedProcedure", cnn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("param1", 1); cmd.Parameters.Add("param2", 0); try { cnn.Open(); cmd.ExecuteScalar();//here is the "outbound indices" exception raized //da.Fill(dt); cnn.Close(); } finally { if (cnn.State != ConnectionState.Closed) { cnn.Close(); } } } } }
[14 Dec 2006 10:20]
Tonci Grgin
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at http://dev.mysql.com/doc/en/installing-source.html Explanation: Hi Pavel and thanks for complete test case provided. I can't repeat this problem using latest c/NET 1.0.9 SVN sources. The only change I made to code was: cmd.Parameters.Add("param1", 1); >> cmd.Parameters.Add("?param1", 1); cmd.Parameters.Add("param2", 0); >> cmd.Parameters.Add("?param2", 0); but it's not problem-related in any way.