From 9565e3420bdc214c389aa513748da11ff16b1fca Mon Sep 17 00:00:00 2001 From: Bill King Date: Wed, 8 Apr 2009 15:40:24 +1000 Subject: DB2 driver returning double field as empty The high precision code path was getting an empty string on the second call to getstringdata, which was causing it to return empty for the field. Really only needed to call it once anyway, so use the original call. Reviewed-by: Justin McPherson --- src/sql/drivers/db2/qsql_db2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sql/drivers/db2/qsql_db2.cpp b/src/sql/drivers/db2/qsql_db2.cpp index 5d221b8..2786dbb 100644 --- a/src/sql/drivers/db2/qsql_db2.cpp +++ b/src/sql/drivers/db2/qsql_db2.cpp @@ -1058,7 +1058,7 @@ QVariant QDB2Result::data(int field) case QSql::HighPrecision: default: // length + 1 for the comma - v = new QVariant(qGetStringData(d->hStmt, field, info.length() + 1, isNull)); + v = new QVariant(value); ok = true; break; } -- cgit v0.12