User: ihi     
Date: 2007-11-21 15:04:49+0000
Modified:
   dba/connectivity/source/drivers/mysql/YCatalog.cxx

Log:
 INTEGRATION: CWS dba24c (1.6.132); FILE MERGED
 2007/10/26 11:54:23 fs 1.6.132.1: 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.7
Delta lines:  +10 -5
--------------------
--- YCatalog.cxx        2006-09-17 03:03:00+0000        1.6
+++ YCatalog.cxx        2007-11-21 15:04:46+0000        1.7
@@ -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]

Reply via email to