summaryrefslogtreecommitdiffstats
path: root/src/sql
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-10-29 08:10:27 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-10-29 08:10:41 (GMT)
commitdf37b2e9023bc2cebe00c77be6040019cfdc24b6 (patch)
tree06739d09b63dd673b510a5af31de7c30407bed6e /src/sql
parentf32abd2b9febdeadeb5536d0318f77be4180f142 (diff)
parentcabfa68f3e37e79a18775a9970f6d166e75ece07 (diff)
downloadQt-df37b2e9023bc2cebe00c77be6040019cfdc24b6.zip
Qt-df37b2e9023bc2cebe00c77be6040019cfdc24b6.tar.gz
Qt-df37b2e9023bc2cebe00c77be6040019cfdc24b6.tar.bz2
Merge commit origin/4.6 into team-widgets/4.6
Diffstat (limited to 'src/sql')
-rw-r--r--src/sql/drivers/oci/qsql_oci.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/sql/drivers/oci/qsql_oci.cpp b/src/sql/drivers/oci/qsql_oci.cpp
index 468e02e..17f2c92 100644
--- a/src/sql/drivers/oci/qsql_oci.cpp
+++ b/src/sql/drivers/oci/qsql_oci.cpp
@@ -1257,7 +1257,11 @@ bool QOCICols::execBatch(QOCIResultPrivate *d, QVector<QVariant> &boundValues, b
case QVariant::String: {
col.bindAs = SQLT_STR;
for (uint j = 0; j < col.recordCount; ++j) {
- uint len = boundValues.at(i).toList().at(j).toString().length() + 1;
+ uint len;
+ if(d->isOutValue(i))
+ len = boundValues.at(i).toList().at(j).toString().capacity() + 1;
+ else
+ len = boundValues.at(i).toList().at(j).toString().length() + 1;
if (len > col.maxLen)
col.maxLen = len;
}
@@ -1268,7 +1272,10 @@ bool QOCICols::execBatch(QOCIResultPrivate *d, QVector<QVariant> &boundValues, b
default: {
col.bindAs = SQLT_LBI;
for (uint j = 0; j < col.recordCount; ++j) {
- col.lengths[j] = boundValues.at(i).toList().at(j).toByteArray().size();
+ if(d->isOutValue(i))
+ col.lengths[j] = boundValues.at(i).toList().at(j).toByteArray().capacity();
+ else
+ col.lengths[j] = boundValues.at(i).toList().at(j).toByteArray().size();
if (col.lengths[j] > col.maxLen)
col.maxLen = col.lengths[j];
}