Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Technically a continuation of the fix of fdo#48345; the latter removed
the m_xRow.set(m_xDriverRow,UNO_QUERY_THROW); from OKeySet::next,
this one removes it from OKeySet::absolute().

It finishes the fix of fdo#47520, which was already partially fixed by
the fix for fdo#48345.

fdo#47520 is: with (sqlite)odbc, when primary key is/contains a
(var)char column (string), that column is displayed blank and fails to
update.

After fdo#48345 is fixed, only the *first* line had this problem,
because it was gotten at by absolute(1); the others were gotten by
next(), which was fixed.

-- 
Lionel
From c08067d6da94743d53217cbc26cffae00a22dc3a Mon Sep 17 00:00:00 2001
From: Lionel Elie Mamane <lionel@mamane.lu>
Date: Fri, 1 Jun 2012 16:40:41 +0200
Subject: [PATCH] fdo#47520 use the already retrieved row instead of driver
 row

This avoids asking the driver for the same data twice.
This is particularly important for ODBC data sources, because when asking for (VAR)CHAR data the 
second time, one gets no data (and status SQL_NO_DATA) because of the "retrieve in parts" semantics 
of these datatypes.

Change-Id: I96f2df9927fda72ccf19f78ec5c561f5626c003f
---
 dbaccess/source/core/api/KeySet.cxx |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index bc2a5f3..715ca6b 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -1241,8 +1241,7 @@ sal_Bool OKeySet::absolute_checked( sal_Int32 row,sal_Bool i_bFetchRow )
                     bNext = fetchRow();
                 if ( bNext )
                 {
-                    m_xRow.set(m_xDriverRow,UNO_QUERY_THROW);
-                    return m_aKeyIter != m_aKeyMap.end() && m_aKeyIter != m_aKeyMap.begin();
+                    i_bFetchRow = true;
                 }
             }
             else
-- 
1.7.7.3


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.