[Mono-dev] Sybase ASA Odbc, timestamp, fractional seconds, possible bug in mono Odbc stack?

Mads Bondo Dydensborg mbd at dbc.dk
Mon May 14 01:45:15 EDT 2007


fredag 04 maj 2007 14:45 skrev Mads Bondo Dydensborg:
> fredag 04 maj 2007 10:56 skrev A Nagappan:
> > Hi,
> > 
> > Could you please send me a test.cs file to reproduce this bug ?

Hi again.

I would still appreciate some feedback on wheter or not this is a flaw/bug. On 
the one hand, I am pretty certain that what I describe is what happens. OTOH 
I would be surprised if the Mono ODBC stack really contained such an error.

Please help,

Regards

Mads

> 
> 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
> 

-- 
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




More information about the Mono-devel-list mailing list