[Mono-dev] Sybase ASA Odbc, timestamp, fractional seconds, possible bug in mono Odbc stack?
Mads Bondo Dydensborg
mbd at dbc.dk
Fri May 4 08:45:27 EDT 2007
fredag 04 maj 2007 10:56 skrev A Nagappan:
> Hi,
>
> Could you please send me a test.cs file to reproduce this bug ?
Please find it attached.
Running "select PublishedTime from PublishingJob" from isql returns:
2007-05-03 10:57:15.000
2007-05-03 10:57:15.920
2007-05-03 10:57:15.000
2007-05-03 10:57:15.000
And, the output from the test.cs program is:
$ mono --debug test.exe
Creating connection
Opening connection
Executing command
Reading data
Column 0: 5/3/2007 10:57:15 AM
Unhandled Exception: System.ArgumentOutOfRangeException: Argument is out of
range.
Parameter name: Parameters describe an unrepresentable DateTime.
at System.DateTime..ctor (Int32 year, Int32 month, Int32 day, Int32 hour,
Int32 minute, Int32 second, Int32 millisecond) [0x00000]
at System.Data.Odbc.OdbcDataReader.GetValue (Int32 ordinal) [0x00415]
in /home/compile/Compile/Mono/mcs/class/System.Data/System.Data.Odbc/OdbcDataReader.cs:730
at System.Data.Odbc.OdbcDataReader.get_Item (Int32 index) [0x00000]
in /home/compile/Compile/Mono/mcs/class/System.Data/System.Data.Odbc/OdbcDataReader.cs:153
at Test.OdbcTest.OdbcTest.Main (System.String[] args) [0x00057]
in /home/madsdyd/Tests/OdbcDateTime/test.cs:26
So, the first row is correctly made into a DateTime, the next is not.
Stripping the fractional of all dates in the database works, but is not
really what I want :-)
Regards & thanks in advance for your help.
Mads
--
Med venlig hilsen/Regards
Systemudvikler/Systemsdeveloper cand.scient.dat, Ph.d., Mads Bondo Dydensborg
Dansk BiblioteksCenter A/S, Tempovej 7-11, 2750 Ballerup, Tlf. +45 44 86 77 34
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.cs
Type: text/x-objcsrc
Size: 1142 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070504/fd8d4b53/attachment.bin
More information about the Mono-devel-list
mailing list