Bug #6785 MySqlDateTime InvalidCastException when using System.Convert
Submitted: 24 Nov 2004 0:48 Modified: 6 Nov 2007 14:50
Reporter: Lynn Eriksen Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S4 (Feature request)
Version:1.0.2 gamma OS:Windows (WinXP)
Assigned to: CPU Architecture:Any

[24 Nov 2004 0:48] Lynn Eriksen
Description:
The struct 'MySqlDateTime' when using System.Convert throws an 'InvalidCastException'.

Being able to use System.Convert would be exteremly valuable in all type of reflection and binding senarios.

How to repeat:
Object OldValue = Reader.GetMySqlDateTime(6);

NewValue DateTime = System.Convert.ChangeType(NewValue,typeof(DateTime));

Suggested fix:
Please implement IConvertible or compareable fix that works with System.Convert
[6 Nov 2007 14:50] Reggie Burnett
This is no longer a problem