To add to the confusion, I have dropped and recreated the table utilizing REAL instead of INT. I added one record to the table I did a cleanup ( vacuum?) Of the db and got rid of all old data. When I browse the table it shows one record I open the db connection in c# and it still has 31821 records in it... Connection looks right Can post code if needed Thanks, Am really stumped
-----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Jay Howard Sent: Friday, April 06, 2012 9:55 AM To: 'General Discussion of SQLite Database' Subject: Re: [sqlite] Integer Truncation Issue I have gone as far as Modifying the table but still no dice.. Maybe I have to drop and recreate the table? -----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Rob Richardson Sent: Friday, April 06, 2012 9:38 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Integer Truncation Issue Disclaimer: I am not in any way an expert! As I understand things, in SQLite, any value can be stored in any column, regardless of type. But in C#, the System.Data.SQLite library isn't that flexible. If the table definition says the column contains integers, then all data in the table is processed as integers. I'm sure others will give more complete and more accurate responses. RobR -----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Jay Howard Sent: Friday, April 06, 2012 9:30 AM To: 'sqlite-users@sqlite.org' Subject: [sqlite] Integer Truncation Issue I have a strange issue, I have a table from a 3rd part piece fo software that I am trying to debug... The schema is below CREATE TABLE [energy_history] ( [addr] INT NULL, [year] INT NULL, [month] INT NULL, [day] INT NULL, [hour] INT NULL, [min] INT NULL, [ch1_amps_avg] INT NULL, [ch1_kw_avg] INT NULL, [ghg] INT NULL, [cost] INT NULL, [ch1_amps_min] INT NULL, [ch1_amps_max] INT NULL, [ch1_kw_min] INT NULL, [ch1_kw_max] INT NULL, [dt] DATETIME NULL, PRIMARY KEY ([addr],[year],[month],[day],[hour],[min]) ) When I use the sqllite data browser tools to view the data is stored as numeric values eg .3092 (the values I am looking for) When I get the values out of the db using c# the dataset is created with a datatype of int32 so all the data truncates. Am I missing something? Hope someone can help Thanks, Jay _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users