summaryrefslogtreecommitdiffstats
path: root/src/sql/drivers
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2009-10-30 11:15:11 (GMT)
committerhjk <qtc-committer@nokia.com>2009-10-30 11:15:11 (GMT)
commit7c04935b278db196b3e67a6b501ec14d852acabd (patch)
tree2424c1a9c90757947cb13e67a4a61ad3473fdd7a /src/sql/drivers
parent1bed105d048531e3e260eff0ef2533d7cc8ba7fb (diff)
parent83fff2f970b9a7b41861336c7dca0eadbda28099 (diff)
downloadQt-7c04935b278db196b3e67a6b501ec14d852acabd.zip
Qt-7c04935b278db196b3e67a6b501ec14d852acabd.tar.gz
Qt-7c04935b278db196b3e67a6b501ec14d852acabd.tar.bz2
Merge commit 'mainline/4.6' into 4.6
Diffstat (limited to 'src/sql/drivers')
-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];
}