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: [email protected] [mailto:[email protected]] 
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: [email protected] [mailto:[email protected]] 
On Behalf Of Jay Howard
Sent: Friday, April 06, 2012 9:30 AM
To: '[email protected]'
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
[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
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to