summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2012-12-05 05:58:54 +0100
committerLionel Elie Mamane <lionel@mamane.lu>2012-12-06 19:20:05 +0100
commit249028838a4f87aa8c8addc4531239171d8016c2 (patch)
tree0d6f789c6da5d8b92a4134432fe4301094ce2b73 /connectivity
parent1bb331a44f922e0250905f59354dc1ffdbc7e044 (diff)
comment on our usage of SQLGetData extensions
Change-Id: I9580fa4828db8f19b84ce8f88f8cbc7ab72985b6
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/odbcbase/OResultSet.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/connectivity/source/drivers/odbcbase/OResultSet.cxx b/connectivity/source/drivers/odbcbase/OResultSet.cxx
index fbad2df752c2..b40361c7bbce 100644
--- a/connectivity/source/drivers/odbcbase/OResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/OResultSet.cxx
@@ -134,6 +134,13 @@ OResultSet::OResultSet(SQLHANDLE _pStatementHandle ,OStatement_Base* pStmt) :
try
{
SQLUINTEGER nValueLen = 0;
+ // LibreOffice ODBC binds columns only on update, so we don't care about SQL_GD_ANY_COLUMN / SQL_GD_BOUND
+ // TODO: maybe a problem if a column is updated, then an earlier column fetched?
+ // TODO: aren't we assuming SQL_GD_OUTPUT_PARAMS?
+ // If yes, we should at least OSL_ENSURE it,
+ // even better throw an exception any OUT parameter registration if !SQL_GD_OUTPUT_PARAMS.
+ // If !SQL_GD_ANY_ORDER, cache the whole row so that callers can access columns in any order.
+ // In other words, isolate them from ODBC restrictions.
OTools::GetInfo(m_pStatement->getOwnConnection(),m_aConnectionHandle,SQL_GETDATA_EXTENSIONS,nValueLen,NULL);
m_bFetchData = !((SQL_GD_ANY_ORDER & nValueLen) == SQL_GD_ANY_ORDER && nCurType != SQL_CURSOR_FORWARD_ONLY);
}