Ticket Hash: | 2b823bfe08e0ff868948c98311fe53b7088ffe69 | |||
Title: | Reading NULL from double column should return NaN | |||
Status: | Open | Type: | Feature_Request | |
Severity: | Important | Priority: | Medium | |
Subsystem: | Data_Reader | Resolution: | Not_Backwards_Compatible | |
Last Modified: | 2015-01-28 18:16:55 | |||
Version Found In: | 1.0.90 | |||
User Comments: | ||||
anonymous added on 2015-01-28 16:51:28:
According to http://www.sqlite.org/cvstrac/tktview?tn=3060 writing NaN to a double column writes NULL. However when reading from a double column with SqliteReader.ReadDouble, reading a NULL results in a class cast exception. This should return NaN and not throw an exception. mistachkin added on 2015-01-28 18:16:55: I've looked into this issue. Changing the semantics of the GetDouble method in this fashion would not be backwards compatible. The recommended way to do this is to check for NULL values in advance by calling IsDBNull with the column number, which may be obtained from GetOrdinal. |