System.Data.SQLite

Login
This project makes use of Eagle, provided by Mistachkin Systems.
Eagle: Secure Software Automation
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

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

<hr /><i>anonymous added on 2011-05-29 08:08:51 UTC:</i><br />
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

<hr /><i>mistachkin added on 2011-07-05 07:50:13 UTC:</i><br />
Fixed by [eb6a22a1a9].  For tests, see [2a2aa7392c].