Re: [sqlite] Support for System.Data.SQLite: Different API type for int/integer columns

2019-01-28 Thread Barry
I use Convert.ToInt32 (or whatever else is appropriate) instead of direct casts when reading from System.Data.SQLite... I use a very similar schema in an SQLServer and SQLite database, and Convert seems to handle many of the differences without requiring different code for each database engine.

Re: [sqlite] Support for System.Data.SQLite: Different API type for int/integer columns

2019-01-27 Thread Joe Mistachkin
JP wrote: > > The answers don't explain why there is a bitness difference at run-time > between the types retrieved from INT and INTEGER columns, and that's my > question. From reading https://sqlite.org/datatype3.html I understand > there should be no difference whatsoever between defining a

Re: [sqlite] Support for System.Data.SQLite: Different API type for int/integer columns

2019-01-27 Thread Simon Slavin
On 24 Jan 2019, at 3:27pm, JP wrote: > I have encountered the same problem as this: > https://stackoverflow.com/q/4925084 What is returned by typeof(reader["myColumn"]) in each case ? I suspect that you're getting an integer when the column is declared as INTEGER, but not when the column is

[sqlite] Support for System.Data.SQLite: Different API type for int/integer columns

2019-01-27 Thread JP
Hello, I have encountered the same problem as this: https://stackoverflow.com/q/4925084 The answers don't explain why there is a bitness difference at run-time between the types retrieved from INT and INTEGER columns, and that's my question. From reading https://sqlite.org/datatype3.html I