System.Data.SQLite

View Ticket
Login
Ticket Hash: 1919077903c0439688ab587e7a8fe28e73d650ba
Title: Data Rounding Issue with SQLiteDataAdapter (secondary issue)
Status: Closed Type: Incident
Severity: Important Priority: Medium
Subsystem: None Resolution: Works_As_Designed
Last Modified: 2014-07-18 19:18:35
10.99 years ago
Created: 2014-07-18 15:40:10
10.99 years ago
Version Found In: 1.0.93.0
User Comments:
anonymous added on 2014-07-18 15:40:10:
This is somewhat related to the issue found at ticket #52816622f3, but there are a couple differences.

My sample project reads and inserts data from a table to a copy table.  When the first value inserted is an Int64, the following values are also inserted as Int64 even if they're being passed in as Doubles.

But if the first value inserted is a Double, then the rest are treated as Doubles and I don't lose any precision.

mistachkin added on 2014-07-18 19:18:19:
Please change your code to do this:

insertCommand.Parameters[0].ResetDbType();
insertCommand.Parameters[0].Value = reader.GetValue(0);

insertCommand.Parameters[1].ResetDbType();
insertCommand.Parameters[1].Value = reader.GetValue(1);