summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/odbcbase
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2013-08-27 18:07:14 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2013-08-27 18:50:14 +0200
commit89c6e2327fa9fb24bf21231c5b7ab9b76bcd5099 (patch)
tree1309ceacc9752e698e1839d02ca04996effc8e49 /connectivity/source/drivers/odbcbase
parent2939a1fa638f63162f0a9741e139e9439144556b (diff)
odbc insert: unbind as soon bindings not necessary
SQLFetchScroll uses the bound columns, and writes to them. This has two problems: 1) For non-bookmark columns, this happens in our buffers, and at first sight could be innocuous. However, it allows the driver to disallow us to use SQLGetData on the same columns, which we intend to do... 2) For bookmark column, the "read bookmark from" and "write bookmark to" buffers end up being the same. This unnecessarily exposes us to driver bugs in this corner case. Change-Id: I594d34cf5a64564766f06b49c86f8737961573c0
Diffstat (limited to 'connectivity/source/drivers/odbcbase')
-rw-r--r--connectivity/source/drivers/odbcbase/OResultSet.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/connectivity/source/drivers/odbcbase/OResultSet.cxx b/connectivity/source/drivers/odbcbase/OResultSet.cxx
index a35105e6a5b4..99c4e5775502 100644
--- a/connectivity/source/drivers/odbcbase/OResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/OResultSet.cxx
@@ -896,6 +896,8 @@ void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException)
throw;
}
+ nRet = unbind();
+ OTools::ThrowException(m_pStatement->getOwnConnection(),nRet,m_aStatementHandle,SQL_HANDLE_STMT,*this);
if ( bPositionByBookmark )
{
@@ -907,8 +909,6 @@ void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException)
nRet = N3SQLFetchScroll(m_aStatementHandle,SQL_FETCH_RELATIVE,0); // OJ 06.03.2004
// sometimes we got an error but we are not interested in anymore #106047# OJ
// OTools::ThrowException(m_pStatement->getOwnConnection(),nRet,m_aStatementHandle,SQL_HANDLE_STMT,*this);
- nRet = unbind();
- OTools::ThrowException(m_pStatement->getOwnConnection(),nRet,m_aStatementHandle,SQL_HANDLE_STMT,*this);
if(m_pSkipDeletedSet)
{