summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brand <mabrand@mabrand.nl>2012-04-13 01:01:23 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-17 23:16:51 +0200
commit00bf077b98bb53304bd9e487e9ad3d0734fb65af (patch)
tree17643b9eccd9ad03c76dde90ebd3c0a90cc159cc
parentf869a12c1043271b2ce8987b07a863ba3c78d6c9 (diff)
remove useless workaround
The workaround attempts to let the application reserve memory in QString for receiving the stored procedure output parameter. This does not work because the reserved capacity is not preserved through QVariant. Unfortunately, the application must actually populate QString with at least the number of characters that will be received. Change-Id: Icb3be60d6bd570ad2349f20fb7d93b340e395627 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp
index 9b1b7fa2ba..f503f64cdf 100644
--- a/src/sql/drivers/odbc/qsql_odbc.cpp
+++ b/src/sql/drivers/odbc/qsql_odbc.cpp
@@ -1502,8 +1502,7 @@ bool QODBCResult::exec()
int strSize = str.length() * sizeof(SQLTCHAR);
if (bindValueType(i) & QSql::Out) {
- QVarLengthArray<SQLTCHAR> a(toSQLTCHAR(str));
- a.reserve(str.capacity());
+ const QVarLengthArray<SQLTCHAR> a(toSQLTCHAR(str));
QByteArray ba((const char *)a.constData(), a.size() * sizeof(SQLTCHAR));
r = SQLBindParameter(d->hStmt,
i + 1,