I have a system running on an Android tablet that downloads invoices from a SQL Server and stores the data in a local SQLite database on the tablet. Every now and then (twice in the last 4 months out of thousands of invoices) an invoice is off by one cent. For example an invoice total in SQL Server is 100.41, but it shows on the tablet as 100.40.
I have no code that does any rounding, could SQLite be doing something unexpected in the background?
The code to create the field in the SQLite table is this:
m.Put("inv_amount", DBUtils.DB_REAL)
and the code to pull the data back from SQL Server (using the RemoteDatebaseConnector) is:
SELECT SUM(ivd_amount) FROM InvoiceDetails INNER JOIN Invoices ON ivd_invfk = inv_pk WHERE inv_awbfk = awb_pk) AS InvoiceTotal
Anyone have any ideas?
I have no code that does any rounding, could SQLite be doing something unexpected in the background?
The code to create the field in the SQLite table is this:
m.Put("inv_amount", DBUtils.DB_REAL)
and the code to pull the data back from SQL Server (using the RemoteDatebaseConnector) is:
SELECT SUM(ivd_amount) FROM InvoiceDetails INNER JOIN Invoices ON ivd_invfk = inv_pk WHERE inv_awbfk = awb_pk) AS InvoiceTotal
Anyone have any ideas?