System.Data.SQLite

Login
This project makes use of Eagle, provided by Mistachkin Systems.
Eagle: Secure Software Automation
2011-07-07
04:35 Ticket [b0a5990f48] C# Datatype Double range not fully supported status still Closed with 2 other changes artifact: 16857a2223 user: mistachkin
2011-07-05
07:50 Closed ticket [b0a5990f48]. artifact: 91e20abcc7 user: mistachkin
07:47
Fix for [2c630bffa7] and [b0a5990f48]. check-in: eb6a22a1a9 user: mistachkin tags: trunk
07:20 Ticket [b0a5990f48] C# Datatype Double range not fully supported status still Open with 1 other change artifact: c9605b6ba9 user: mistachkin
2011-05-29
08:08 Ticket [b0a5990f48]: 1 change artifact: 61fd20e790 user: anonymous
2011-05-25
07:46 Ticket [b0a5990f48]: 3 changes artifact: 7b52d40db1 user: anonymous
2011-05-24
16:29 New ticket [b0a5990f48]. artifact: 565a598ac2 user: anonymous

Ticket Hash: b0a5990f48ea830c075c6ea4f8b499145225d329
Title: C# Datatype Double range not fully supported
Status: Closed Type: Code_Defect
Severity: Important Priority: Immediate
Subsystem: Db_Type_Conversion Resolution: Fixed
Last Modified: 2011-07-07 04:35:32
Version Found In: 1.0.72.0
Description:
I wrote my own ORM library and tested all basic C# data types from all integer types up to all real types with System.Data.SQLite.

It turnes out that real number values using the C# type "Double" are correctly supported and mapped if its value is inside the range "Single.MinValue" to "Single.MinValue". But the desired range of "Double.MinValue" to "Double.MinValue" is not driven correctly. The values occur as infinite.

My same library detects proper work with the "Devart SQLite Provider docConnect" which lets me follow that "System.Data.SQLite.dll" and/or "SQLite.Interop.dll" limits the real value range in the "Single"-type area instead of the "Double"-type area even though SQLite itself can do real values with the huge range. It is at least an issue of reading the DB. May be of writing also.

The problem is important for applications dealing with Currency values mapped to C# Double type where Single does not support a sufficient mantissa.

By the way: C# "Decimal" type is not feasible with native SQLlite so this support is not feasible and no substitution.

Kind regards efef


anonymous added on 2011-05-25 07:46:24 UTC:
no subject since System.Data.Sqlite supports DOUBLE and REAL appropriate


anonymous added on 2011-05-29 08:08:51 UTC:
When you declare a table column as NUMERIC, DECIMAL, MONEY or CURRENCY, System.Data.SQLite maps that column as DbType.Decimal. http://sqlite.phxsoftware.com/forums/t/31.aspx. Furthermore, there is no precission loss, since the data is stored as a string from version 1.0.56.0 - August 11, 2008 http://sqlite.phxsoftware.com/readme.htm


mistachkin added on 2011-07-05 07:50:13 UTC:
Fixed by [eb6a22a1a9]. For tests, see [2a2aa7392c].