I don't use .NET anything, so I can't speak on it. However, with my wrapper in Delphi, if I store a value as 1 or '1', returning a .AsInteger will succeed. The wrapper is smart enough to decide if it is actually a number. I don't recall if it'll throw an exception if the value in the database is returned as a float (1.1) or if it will just return 1, either by rounding, floor, or ceil it.
I also have run into boolean issues with my wrapper as well though. When I was designing the database in a different application, I was filling the database with, what I thought at the time, boolean values. However, the SQL IDE I was using at the time treated TRUE values as 1, where as my wrapper was expecting -1 as a TRUE. So since the consistency was FALSE = 0 for both, I modified the wrapper (Since I had the source code) to return FALSE if the result was zero, and true otherwise. The code previously was doing something strange with the comparison. It was a few years ago when I encountered this issue, so I don't remember the details exactly. What I might suggest you do is instead of checking GetBoolean (Since it is extremely picky apparently) is use GetInteger != 0. If the result is ZERO this will return FALSE. (1 != 0 = TRUE; 0 != 0 = FALSE) If the result is anything else, you'll return TRUE. On Thu, Jan 30, 2014 at 10:38 AM, Johnny <[email protected]> wrote: > I'm not one of the sqlite dev'rs for sure, > but I immagine that the .net driver has been done with their cooperation > In any case the funny thing is that > (in a particular situation: after a "wrong" insert of "1" instead of 1, > fault of sqlite admin) > my Wrapper level - > can I say that the ADO .net System.Data.SQLite.dll is my Wrapper level? - > is making an "inconsistent" decision, not a "final" one: > GetType returns System.Boolean (why if sqlite typeof is saying text ?!?) > GetBoolean on the other side throws an exception ... > > > > > -- > View this message in context: > http://sqlite.1065341.n5.nabble.com/Boolean-and-DataReader-tp73521p73542.html > Sent from the SQLite mailing list archive at Nabble.com. > _______________________________________________ > sqlite-users mailing list > [email protected] > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

