Bug #18883 | Error fetching TIME columns > 23:59:59 | ||
---|---|---|---|
Submitted: | 7 Apr 2006 11:54 | Modified: | 3 May 2006 7:55 |
Reporter: | Jacques Beaufls | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / ODBC | Severity: | S2 (Serious) |
Version: | 3.51.12 | OS: | Windows (Win XP) |
Assigned to: | CPU Architecture: | Any |
[7 Apr 2006 11:54]
Jacques Beaufls
[13 Apr 2006 19:50]
Tonci Grgin
Hi. Thanks for your problem report. So far it seems something's wrong with DAO components, not MyODBC since my testcase shows: From DB: TimeSpan ==> 01:02:03 Expected: String ==> 01:02:03 From DB: TimeSpan ==> 13:22:45 Expected: String ==> 13:22:45 From DB: TimeSpan ==> 23:59:59 Expected: String ==> 23:59:59 From DB: TimeSpan ==> 1.00:00:01 Expected: String ==> 24:00:01 If you can provide me with full source showing this problem I'll test again.
[19 Apr 2006 7:12]
Jacques Beaufls
Excel with macro fetching rows from database
Attachment: timebugcase.xls (application/octet-stream, text), 26.50 KiB.
[19 Apr 2006 7:15]
Jacques Beaufls
mySQL directory with database files
Attachment: timebugcase.zip (application/x-zip-compressed, text), 482 bytes.
[19 Apr 2006 7:41]
Jacques Beaufls
mySQL files I have uploaded are 5.0.18-nt version. I try to get the last update for MDAC (Microsoft Data Access Component), by I don't know what version I am running now (WXP SP1, .Net framework 1.1). I keep you informed...
[19 Apr 2006 8:09]
Tonci Grgin
Thanks for your input.
[19 Apr 2006 21:21]
Mark Matthews
Please reference the ODBC specification (http://msdn.microsoft.com/library/en-us/odbc/htm/odbcc_data_types.asp and http://msdn.microsoft.com/library/en-us/odbc/htm/odbcconstraints_of_the_gregorian_calendar...), where TIME values are constrained to the following (and thus not all TIMEs that MySQL can deal with can be consumed by ODBC or layers that sit on top of it): > Constraints of the Gregorian Calendar > > Date and datetime data types, and the trailing fields of interval data types, must conform to the constraints of the Gregorian calendar. These constraints are as follows: > > * The value of the month field must be between 1 and 12, inclusive. > * The value of the day field must be in the range from 1 through the number of days in the month. The number of days in the month is determined from the values of the year and months fields and can be 28, 29, 30, or 31. (The number of days in the month can also depend on whether it is a leap year.) > * The value of the hour field must be between 0 and 23, inclusive. > * The value of the minute field must be between 0 and 59, inclusive. > * For the trailing seconds field of interval data types, the value of the seconds field must be between 0 and 59.9(n), inclusive, where n is the number of digits in the fractional seconds precision. > * For the trailing seconds field of datetime data types, the value of the seconds field must be between 0 and 61.9(n), inclusive, where n specifies the number of "9" digits and the value of n is the fractional seconds precision. (The range of seconds allows as many as two leap seconds to maintain synchronization of sidereal time.) The only way I can think of getting to these values in "stock" ODBC from ADO is to treat them as strings.
[3 May 2006 7:55]
Jacques Beaufls
Thank you, guys !