I have an app that creates a table of file names and sizes.  The app 
itself works fine.

I wanted to look at the table just to make sure that it was doing what 
it should, so I used something to do a simple SELECT * and bind the 
results to a DataGrid.

When I did, I got an error "Value was either too large or too small for 
an Int32".

I tracked it down to the column being created as type INT instead of 
INTEGER.  SQLite treats these as the same, but System.Data.SQLite treats 
INT as Int32 and INTEGER as Int64.

Changing the app so that the table was created as type INTEGER made the 
error go away.

I traced it down to the SQLiteConvert._typeNames array.

The entry for INT defines it as Int32.  I changed it to Int64 and 
changed the app back to INT for the column.  This also made the error go 
away.

The error also did not occur if there were no files with sizes in excess 
of Int32.MaxValue.

I'm not sure if this is worthy of a bug fix or not.  It could cause 
issues if you were loading a table created somewhere else with a column 
defined as INT instead if INTEGER.  Or not.

Joe D

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to