System.Data.SQLite

Login
This project makes use of Eagle, provided by Mistachkin Systems.
Eagle: Secure Software Automation
Ticket Hash: e0dd9d702db0761237dae38e11e0ff5137c2d789
Title: "Specified cast is not valid" Error if Boolen Type Column Is In Data Model
Status: Closed Type: Incident
Severity: Important Priority: Medium
Subsystem: Data_Reader Resolution: Works_As_Designed
Last Modified: 2014-01-23 01:57:15
Version Found In: x86-2012-1.0.84.0
User Comments:
anonymous added on 2014-01-10 19:18:44:
When attempting to read a simple query to a table that has a boolen type column mapped that contains any nulls, error {"Exception has been thrown by the target of an invocation."} occurs.

{"Specified cast is not valid."}
InnerException: null
Stacktrace:    at System.Data.SQLite.SQLiteDataReader.VerifyType(Int32 i, DbType typ)
   at System.Data.SQLite.SQLiteDataReader.GetBoolean(Int32 i)

IF ALL BOOLEN COLUMNS THAT CONTAIN NULL ARE REMOVED FROM THE MAP, EVERYTHING WORKS FINE.

mistachkin added on 2014-01-10 20:39:01:
The GetBoolean method is designed to throw an exception for NULL values.  The
GetValue method should be used instead.