Hi. I'm trying to extract a date field from a mysql db using .NET and MySQL .NET Connector.
Whithin the test everything works great except the date, I mean, I can get the varchar fields but the DATE field (called R_DATE) is impossible.
My SQL Query is:
SELECT * FROM TABLE
And, the way I'm trying to read it is:
DateTime date = reader.GetDateTime(COLUM_INDEX);
I just don't know what to do. I prove to explicity put the SELECT A, B, C... and didn't work, also tryed with SELECT A, DATE_FORMAT(B, '...) but also didn't.
Anything wrong?
Thanks for the help. Any tip will be very valuable.
EXCEPTION
Test method DocumentsManagementServiceTest.DataManagerTest.TestSearch threw exception:
System.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values.