User: hr      
Date: 06/06/19 18:54:51

Modified:
 /dba/connectivity/source/drivers/odbc/
  ODatabaseMetaData.cxx

Log:
 INTEGRATION: CWS warnings01 (1.29.30); FILE MERGED
 2006/04/07 20:24:36 sb 1.29.30.3: RESYNC: (1.29-1.30); FILE MERGED
 2005/11/16 12:59:19 fs 1.29.30.2: #i57457# warning free code
 2005/11/07 14:44:01 fs 1.29.30.1: #i57457# warning-free code

File Changes:

Directory: /dba/connectivity/source/drivers/odbc/
=================================================

File [changed]: ODatabaseMetaData.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx?r1=1.30&r2=1.31
Delta lines:  +221 -209
-----------------------
--- ODatabaseMetaData.cxx       3 Feb 2006 17:14:56 -0000       1.30
+++ ODatabaseMetaData.cxx       20 Jun 2006 01:54:48 -0000      1.31
@@ -59,7 +59,7 @@
 #endif
 #include "stdio.h"
 #include "TPrivilegesResultSet.hxx"
-
+#include <connectivity/dbexception.hxx>
 
 using namespace connectivity::odbc;
 using namespace com::sun::star::uno;
@@ -1652,7 +1652,7 @@
 sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetConcurrency( sal_Int32 
setType, sal_Int32 concurrency ) throw(SQLException, RuntimeException)
 { 
        SQLUINTEGER nValue;
-       SQLUSMALLINT nAskFor;
+    SQLUSMALLINT nAskFor( SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2 );
        switch(setType)
        {
                case ResultSetType::FORWARD_ONLY:
@@ -1664,6 +1664,9 @@
                case ResultSetType::SCROLL_SENSITIVE:
                        nAskFor = SQL_DYNAMIC_CURSOR_ATTRIBUTES2;
                        break;
+        default:
+            ::dbtools::throwGenericSQLException( ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( "Invalid result set type." ) ), *this );
+            break;
        }
                
        OTools::GetInfo(m_pConnection,m_aConnectionHandle,nAskFor,nValue,*this);
@@ -1683,7 +1686,7 @@
 sal_Bool SAL_CALL ODatabaseMetaData::ownUpdatesAreVisible( sal_Int32 setType ) 
throw(SQLException, RuntimeException)
 { 
        SQLUINTEGER nValue;
-       SQLUSMALLINT nAskFor;
+    SQLUSMALLINT nAskFor( SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2 );
        switch(setType)
        {
                case ResultSetType::FORWARD_ONLY:
@@ -1695,6 +1698,9 @@
                case ResultSetType::SCROLL_SENSITIVE:
                        nAskFor = SQL_DYNAMIC_CURSOR_ATTRIBUTES2;
                        break;
+        default:
+            ::dbtools::throwGenericSQLException( ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( "Invalid result set type." ) ), *this );
+            break;
        }
                
        OTools::GetInfo(m_pConnection,m_aConnectionHandle,nAskFor,nValue,*this);
@@ -1704,7 +1710,7 @@
 sal_Bool SAL_CALL ODatabaseMetaData::ownDeletesAreVisible( sal_Int32 setType ) 
throw(SQLException, RuntimeException)
 { 
        SQLUINTEGER nValue;
-       SQLUSMALLINT nAskFor;
+    SQLUSMALLINT nAskFor( SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2 );
        switch(setType)
        {
                case ResultSetType::FORWARD_ONLY:
@@ -1716,6 +1722,9 @@
                case ResultSetType::SCROLL_SENSITIVE:
                        nAskFor = SQL_DYNAMIC_CURSOR_ATTRIBUTES2;
                        break;
+        default:
+            ::dbtools::throwGenericSQLException( ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( "Invalid result set type." ) ), *this );
+            break;
        }
                
        OTools::GetInfo(m_pConnection,m_aConnectionHandle,nAskFor,nValue,*this);
@@ -1725,7 +1734,7 @@
 sal_Bool SAL_CALL ODatabaseMetaData::ownInsertsAreVisible( sal_Int32 setType ) 
throw(SQLException, RuntimeException)
 { 
        SQLUINTEGER nValue;
-       SQLUSMALLINT nAskFor;
+    SQLUSMALLINT nAskFor( SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2 );
        switch(setType)
        {
                case ResultSetType::FORWARD_ONLY:
@@ -1737,6 +1746,9 @@
                case ResultSetType::SCROLL_SENSITIVE:
                        nAskFor = SQL_DYNAMIC_CURSOR_ATTRIBUTES2;
                        break;
+        default:
+            ::dbtools::throwGenericSQLException( ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( "Invalid result set type." ) ), *this );
+            break;
        }
                
        OTools::GetInfo(m_pConnection,m_aConnectionHandle,nAskFor,nValue,*this);
@@ -1758,17 +1770,17 @@
        return ownInsertsAreVisible(setType);
 }
 // -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::updatesAreDetected( sal_Int32 setType ) 
throw(SQLException, RuntimeException)
+sal_Bool SAL_CALL ODatabaseMetaData::updatesAreDetected( sal_Int32 /*setType*/ 
) throw(SQLException, RuntimeException)
 { 
        return sal_False;
 }
 // -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::deletesAreDetected( sal_Int32 setType ) 
throw(SQLException, RuntimeException)
+sal_Bool SAL_CALL ODatabaseMetaData::deletesAreDetected( sal_Int32 /*setType*/ 
) throw(SQLException, RuntimeException)
 { 
        return sal_False;
 }
 // -------------------------------------------------------------------------
-sal_Bool SAL_CALL ODatabaseMetaData::insertsAreDetected( sal_Int32 setType ) 
throw(SQLException, RuntimeException)
+sal_Bool SAL_CALL ODatabaseMetaData::insertsAreDetected( sal_Int32 /*setType*/ 
) throw(SQLException, RuntimeException)
 { 
        return sal_False;
 }
@@ -1778,7 +1790,7 @@
        return sal_False;
 }
 // -------------------------------------------------------------------------
-Reference< XResultSet > SAL_CALL ODatabaseMetaData::getUDTs( const Any& 
catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& 
typeNamePattern, const Sequence< sal_Int32 >& types ) throw(SQLException, 
RuntimeException)
+Reference< XResultSet > SAL_CALL ODatabaseMetaData::getUDTs( const Any& 
/*catalog*/, const ::rtl::OUString& /*schemaPattern*/, const ::rtl::OUString& 
/*typeNamePattern*/, const Sequence< sal_Int32 >& /*types*/ ) 
throw(SQLException, RuntimeException)
 { 
        return NULL;
 }




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to