summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill King <bking@trolltech.com>2009-07-03 03:08:17 (GMT)
committerBill King <bking@trolltech.com>2009-07-03 03:10:19 (GMT)
commit5b701c1bbbbf4993117bd0311717b73fafae02fd (patch)
tree7e28e6312daac7e3910f83d74fe8f7ada3de9b57
parentb0f18119b4559a2b425222c2d63671422c014783 (diff)
downloadQt-5b701c1bbbbf4993117bd0311717b73fafae02fd.zip
Qt-5b701c1bbbbf4993117bd0311717b73fafae02fd.tar.gz
Qt-5b701c1bbbbf4993117bd0311717b73fafae02fd.tar.bz2
Fixes invalid length for numeric fields in oracle.
When the precisionpolicy is high, and the field is numeric, it was getting confused as a string field and pulling the wrong length value.
-rw-r--r--src/sql/drivers/oci/qsql_oci.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sql/drivers/oci/qsql_oci.cpp b/src/sql/drivers/oci/qsql_oci.cpp
index 8d34dd8..1ffd999 100644
--- a/src/sql/drivers/oci/qsql_oci.cpp
+++ b/src/sql/drivers/oci/qsql_oci.cpp
@@ -611,7 +611,7 @@ static QSqlField qFromOraInf(const OraFieldInfo &ofi)
QSqlField f(ofi.name, ofi.type);
f.setRequired(ofi.oraIsNull == 0);
- if (ofi.type == QVariant::String)
+ if (ofi.type == QVariant::String && ofi.oraType != SQLT_NUM && ofi.oraType != SQLT_VNU)
f.setLength(ofi.oraFieldLength);
else
f.setLength(ofi.oraPrecision == 0 ? 38 : int(ofi.oraPrecision));