I am using sqlite as my database in a .net 4.5 project. There is a table that holds a column of type "double". The database access is wrapped into a class that lays insided a class library project/assembly.
The table is created as follows:
create table mytable (id INTEGER PRIMARY KEY AUTOINCREMENT, myvalue DOUBLE, updateTime INTEGER )
I can insert new rows properly. When I inspect the database with an SQLite Browser, I can clearly see the values are correctly inserted.
Now there is a command line project utilizing the database wrapper class. When I run this programm all double values are correctly fetched.
In another project, beeing a WPF application, i'm using the very same database access wrapper library. But in this case, the double values are totally messed up.
When I put in 14.28 it reads out -5.1897674825990524E-306. I guess there is just some problem of double representation here, but i do not know how to solve it.
SUM: Command Line works, WPF doesn't.
Aucun commentaire:
Enregistrer un commentaire