summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIsrael Lins <israelins85@yahoo.com.br>2013-02-11 19:13:24 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-24 21:57:44 (GMT)
commitdd22022e1b0b1fc9538ae4374477bc2fde00cb85 (patch)
tree95cdaba11573007665598e5c8dd1ca092232a43e /src
parent488cb662604437b31db0667dd9e17772395f16c2 (diff)
downloadQt-dd22022e1b0b1fc9538ae4374477bc2fde00cb85.zip
Qt-dd22022e1b0b1fc9538ae4374477bc2fde00cb85.tar.gz
Qt-dd22022e1b0b1fc9538ae4374477bc2fde00cb85.tar.bz2
ODBC: fix loss of milliseconds when binding QDateTime
Caused by operator precedence error. Follow-up to commit b8b79a0f37ec74fd5b4ad829e522a384ba3622ae Task-number: QTBUG-2192 Change-Id: I17decd18c469b48a0bc938ae05c16cced8042219 Reviewed-by: Mark Brand <mabrand@mabrand.nl> (cherry-picked from qtbase commit 36b6d4afc970a328cced87af3d39b70d327eb3ad) Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp
index c51637c..f95f40c 100644
--- a/src/sql/drivers/odbc/qsql_odbc.cpp
+++ b/src/sql/drivers/odbc/qsql_odbc.cpp
@@ -1413,7 +1413,7 @@ bool QODBCResult::exec()
// (How many leading digits do we want to keep? With SQL Server 2005, this should be 3: 123000000)
int keep = (int)qPow(10.0, 9 - qMin(9, precision));
- dt->fraction /= keep * keep;
+ dt->fraction = (dt->fraction / keep) * keep;
}
r = SQLBindParameter(d->hStmt,