https://bugzilla.novell.com/show_bug.cgi?id=364426
Summary: ODBC: TIME columns are returned with column DataType set
to System.DateTime instead of System.TimeSpan
Product: Mono: Class Libraries
Version: 1.2.6
Platform: i686
OS/Version: Windows XP
Status: NEW
Severity: Major
Priority: P5 - None
Component: Sys.Data
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: Customer
When you make an ODBC query on a table that would return values from a TIME
column, the IDataReader returns the DataType "System.DateTime" instead of
"System.TimeSpan" which is annoying because .ToString() adds returns a date
too.
IOW:
1. Create a table with one column ("column1 TIME")
2. Insert a row into this table with "column1"='11:12:13'
3. Read it using System.Data.Odbc using the IDataReader
IDataReader reader = ...;
Type t = reader.GetFieldType(0);
At this point t==typeof(DateTime) but it should be t==typeof(TimeSpan).
This is a problem because you cannot use the returned value as the input for a
new insert using parameters because you'd get a useless value/string (because
of the additional date).
Regards,
Mark
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs