|Title:||BOOLEAN fields with value "t" or "f" cause|
|Last Modified:||2016-01-19 05:55:17|
|Version Found In:||188.8.131.52|
anonymous added on 2016-01-11 22:50:29:
The field type is BOOLEAN, the value of the field is "t" or "f". When calling System.Data.SQLite.SQLiteConvert.ToBoolean("f"), a System.ArgumentException is called. This is called when utilizing a SQLiteDataReader class to access the field. relevant stack: System.ArgumentException was unhandled HResult=-2147024809 Message=source Source=System.Data.SQLite StackTrace: at System.Data.SQLite.SQLiteConvert.ToBoolean(String source) at System.Data.SQLite.SQLiteConvert.ToBoolean(Object obj, IFormatProvider provider, Boolean viaFramework) at System.Data.SQLite.SQLite3.GetBoolean(SQLiteStatement stmt, Int32 index) at System.Data.SQLite.SQLite3.GetValue(SQLiteStatement stmt, SQLiteConnectionFlags flags, Int32 index, SQLiteType typ) at System.Data.SQLite.SQLiteDataReader.GetValue(Int32 i) at System.Data.SQLite.SQLiteDataReader.get_Item(String name)
mistachkin added on 2016-01-12 04:52:13:
Normally, the BOOLEAN type requires the string to be "true" or "false", not just "t" or "f". Did a previous version of System.Data.SQLite used to support using just the strings "t" or "f" in this context?
mistachkin added on 2016-01-12 20:18:12:
Apparently, the previous versions silently treated all invalid BOOLEAN values as "false" and now an exception is thrown instead.
mistachkin added on 2016-01-12 23:38:03:
The values "t" and "f" were never really supported as "BOOLEAN", per se; however, the exception behavior was changed (inadvertently) in release 184.108.40.206. That being said, I think the new behavior is more correct.
mistachkin added on 2016-01-12 23:38:18:
I'm adding code to trunk that will allow BOOLEAN values to be recognized if they are any valid case-insensitive prefix of "True" and "False", including "t" and "f".
mistachkin added on 2016-01-13 00:09:12:
This has been "fixed" on trunk via check-in [ecf9a72b79755c26].