Tag: cws_src680_dba24c User: fs Date: 2007-10-26 11:54:25+0000 Modified: dba/connectivity/source/drivers/mysql/YCatalog.cxx
Log: during #i73245#: don't rely on the driver's getTableTypes to include VIEW, simply assume we support it (we expose the XViewsSupplier interface, anyway) File Changes: Directory: /dba/connectivity/source/drivers/mysql/ ================================================== File [changed]: YCatalog.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mysql/YCatalog.cxx?r1=1.6&r2=1.6.132.1 Delta lines: +13 -8 -------------------- --- YCatalog.cxx 2006-09-17 03:03:00+0000 1.6 +++ YCatalog.cxx 2007-10-26 11:54:23+0000 1.6.132.1 @@ -4,9 +4,9 @@ * * $RCSfile: YCatalog.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.6.132.1 $ * - * last change: $Author: obo $ $Date: 2006/09/17 03:03:00 $ + * last change: $Author: fs $ $Date: 2007/10/26 11:54:23 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -110,22 +110,27 @@ Sequence< ::rtl::OUString > aTypes(1); aTypes[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW")); +/* sal_Bool bSupportsViews = sal_False; try { Reference<XResultSet> xRes = m_xMetaData->getTableTypes(); Reference<XRow> xRow(xRes,UNO_QUERY); - while ( xRow.is() && xRes->next() ) + while ( !bSupportsViews && xRow.is() && xRes->next() ) { - if ( (bSupportsViews = xRow->getString(1).equalsIgnoreAsciiCase(aTypes[0])) ) - { - break; - } + ::rtl::OUString sTableType( xRow->getString( 1 ) ); + bSupportsViews = sTableType.equalsIgnoreAsciiCase( aTypes[0] ); } } catch(const SQLException&) { } +*/ + // let's simply assume the server is new enough to support views. Current drivers + // as of this writing might not return the proper information in getTableTypes, so + // don't rely on it. + // during #73245# / 2007-10-26 / [EMAIL PROTECTED] + bool bSupportsViews = sal_True; TStringVector aVector; if ( bSupportsViews ) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
