LinqConnect save decimal incorrect

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for SQLite
Post Reply
definitive
Posts: 2
Joined: Mon 24 Jun 2013 10:39

LinqConnect save decimal incorrect

Post by definitive » Mon 24 Jun 2013 10:52

When saving decimal fields, the driver round decimals.
Does not allow to save 3.51m, it incorrectly save 4m.

Sample...

CREATE TABLE [test] (
[id] [VARCHAR(36)] NOT NULL,
[data] [NUMERIC(18, 2)] NOT NULL,
CONSTRAINT [] PRIMARY KEY ([id]));

// Clear Table
using (Database db = new Database())
{
foreach(Test test in db.Tests)
{
db.Tests.DeleteOnSubmit(test);
}
db.SubmitChanges();
}

// Create Record
using(Database db = new Database())
{
Test test = new Test() { Id = "1", Data = 3.51m };
db.Tests.InsertOnSubmit(test);
db.SubmitChanges();
}


// Find record
using (Database db = new Database())
{
Test test2 = db.Tests.First();
MessageBox.Show("expected 3.51 save " + test2.Data.ToString());
}

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: LinqConnect save decimal incorrect

Post by MariiaI » Tue 25 Jun 2013 07:20

Thank you for the report. We have reproduced this issue. We will investigate it and inform you about the results as soon as possible.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: LinqConnect save decimal incorrect

Post by MariiaI » Wed 26 Jun 2013 06:31

We have fixed the issue with decimal datatype. The fix will be included in the next build of dotConnect for SQLite. We will inform you when it is available for download.

definitive
Posts: 2
Joined: Mon 24 Jun 2013 10:39

Re: LinqConnect save decimal incorrect

Post by definitive » Thu 27 Jun 2013 09:51

Any idea when new release will be available.
I can not rollback to previous version, because I also use latest version of PostgreSQL driver.
Even if you can email me the dll, will help alot.

Thanks
Riaan

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: LinqConnect save decimal incorrect

Post by MariiaI » Thu 27 Jun 2013 10:31

We plan to release the new build of dotConnect for SQLite next week. We will definitely inform you when the new build is available for download.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: LinqConnect save decimal incorrect

Post by MariiaI » Thu 04 Jul 2013 06:20

New build of dotConnect for SQLite 4.6.276 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/sqlite/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=29&t=27459.

Post Reply