From 5b701c1bbbbf4993117bd0311717b73fafae02fd Mon Sep 17 00:00:00 2001 From: Bill King Date: Fri, 3 Jul 2009 13:08:17 +1000 Subject: 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. --- src/sql/drivers/oci/qsql_oci.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sql') diff --git a/src/sql/drivers/oci/qsql_oci.cpp b/src/sql/drivers/oci/qsql_oci.cpp index 8d34dd8750..1ffd999b3a 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)); -- cgit v1.2.3