summaryrefslogtreecommitdiffstats
path: root/src/sql/drivers/odbc
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-09-17 15:22:00 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2009-09-17 15:22:00 (GMT)
commitb7923d48fb6d755d4563eeed0e7f3cbc774d69d5 (patch)
treeec8bb06f58f714d0b799164693e93bf0d51b6bcf /src/sql/drivers/odbc
parente6dbbd0398d70ee64a3b8129e9621cfa15d70f8c (diff)
parenta62506aae40ede3fd8030312321759f669458909 (diff)
downloadQt-b7923d48fb6d755d4563eeed0e7f3cbc774d69d5.zip
Qt-b7923d48fb6d755d4563eeed0e7f3cbc774d69d5.tar.gz
Qt-b7923d48fb6d755d4563eeed0e7f3cbc774d69d5.tar.bz2
Merge branch '4.5' into 4.6
Conflicts: tests/auto/qimagereader/tst_qimagereader.cpp tests/auto/qpainter/tst_qpainter.cpp tests/auto/qtwidgets/tst_qtwidgets.cpp
Diffstat (limited to 'src/sql/drivers/odbc')
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp
index 22f446d..7cf5e8b 100644
--- a/src/sql/drivers/odbc/qsql_odbc.cpp
+++ b/src/sql/drivers/odbc/qsql_odbc.cpp
@@ -882,6 +882,11 @@ bool QODBCResult::reset (const QString& query)
return false;
}
+ SQLINTEGER isScrollable, bufferLength;
+ r = SQLGetStmtAttr(d->hStmt, SQL_ATTR_CURSOR_SCROLLABLE, &isScrollable, SQL_IS_INTEGER, &bufferLength);
+ if(r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO)
+ setForwardOnly(isScrollable==SQL_NONSCROLLABLE);
+
SQLSMALLINT count;
SQLNumResultCols(d->hStmt, &count);
if (count) {
@@ -1500,6 +1505,11 @@ bool QODBCResult::exec()
return false;
}
+ SQLINTEGER isScrollable, bufferLength;
+ r = SQLGetStmtAttr(d->hStmt, SQL_ATTR_CURSOR_SCROLLABLE, &isScrollable, SQL_IS_INTEGER, &bufferLength);
+ if(r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO)
+ setForwardOnly(isScrollable==SQL_NONSCROLLABLE);
+
SQLSMALLINT count;
SQLNumResultCols(d->hStmt, &count);
if (count) {