Bug #17749 There is no char type in MySqlDbType
Submitted: 27 Feb 2006 18:54 Modified: 28 Feb 2006 22:52
Reporter: Maksim Aliseenko Email Updates:
Status: Closed Impact on me:
Category:Connector / NET Severity:S3 (Non-critical)
Version:1.0.7 OS:Windows (Windows XP)
Assigned to: Reggie Burnett CPU Architecture:Any

[27 Feb 2006 18:54] Maksim Aliseenko
When I try to get MySqlCommandBuilder.DeriveParameters method with a procedure which have char type parameter, I throw MySqlException exception with message "Unhandled type encountered".

How to repeat:
following code
private void addPortalInfo_Click(object sender, System.EventArgs e)
			MySqlConnection conn = new MySqlConnection("SERVER = Localhost;DATABASE = test;UID = root;PASSWORD =;");
			MySqlCommand cmd = new MySqlCommand("testProc", conn);
			cmd.CommandType = System.Data.CommandType.StoredProcedure;
			MySqlParameter[] discoveredParameters; 
			catch(Exception ex)
			discoveredParameters = new MySqlParameter[cmd.Parameters.Count - 1];
			cmd.Parameters.CopyTo(discoveredParameters, 0);

testProc - stored procedure with char type parameter

Suggested fix:
Add char type in MySqlDbType
[28 Feb 2006 22:52] Reggie Burnett
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 bugfix, yourself. More information 
about accessing the source trees is available at

Additional info:

Fixed in 1.0.8

Fixed by renaming MySqlDbType.String to the more appropriate MySqlDbType.Char
[28 Feb 2006 22:55] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from: