Fix error when inserting to tables with datetime fields with QODBC
authorThiago A. Correa <thiago.correa@gmail.com>
Fri, 13 Jul 2012 17:28:18 +0000 (14:28 -0300)
committerQt by Nokia <qt-info@nokia.com>
Mon, 16 Jul 2012 21:48:10 +0000 (23:48 +0200)
commitb8b79a0f37ec74fd5b4ad829e522a384ba3622ae
tree030a88e4b3a780e54967b73fa95f7d216af59ac2
parent5762da38b989e65dedd3d04e258615a9558e4bf1
Fix error when inserting to tables with datetime fields with QODBC

SQL Server 10 introduced stricter rules for TIMESTAMP validation,
making it necessary to specify the decimal digits.
Other databases might do the same as well, so this patch introduces
a check for the TIMESTAMP column size and adjusts the decimal digits
parameter as needed.

Task-number: QTBUG-2192

Change-Id: If6d798c6c928ebda75bc474e49a07fbbfbe5816c
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
src/sql/drivers/odbc/qsql_odbc.cpp
tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp