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

A Nagappan anagappan at novell.com
Wed May 16 05:08:48 EDT 2007


Hi,
  From the stack trace it looks like the issue is in System.DateTime,
could you please file a bug on that ? With a generic test-case to
reproduce this bug.

http://bugzilla.ximian.com/enter_bug.cgi?product=Mono%3A%20Class%20Libraries
and Component as System.

Thanks
Nagappan


Nagappan A <anagappan at novell.com>
Linux Desktop Testing Project - http://ldtp.freedesktop.org
http://nagappanal.blogspot.com

Novell, Inc.
SUSE* Linux Enterprise 10
Your Linux is ready*
http://www.novell.com/linux



>>> On Fri, May 4, 2007 at  6:15 PM, in message
<200705041445.27847.mbd at dbc.dk>,
Mads Bondo Dydensborg <mbd at dbc.dk> wrote: 
> 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/OdbcDataRea
> der.cs:730
>   at System.Data.Odbc.OdbcDataReader.get_Item (Int32 index) [0x00000]

> in 
>
/home/compile/Compile/Mono/mcs/class/System.Data/System.Data.Odbc/OdbcDataRea
> der.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




More information about the Mono-devel-list mailing list