Tag: cws_src680_dba24d
User: oj      
Date: 2007-11-21 12:40:42+0000
Modified:
   dba/connectivity/source/drivers/ado/AConnection.cxx
   dba/connectivity/source/drivers/ado/ADatabaseMetaData.cxx
   dba/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx

Log:
 #i68854# impl TypeSettingInfo for Oracle and some clean up

File Changes:

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

File [changed]: AConnection.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/ado/AConnection.cxx?r1=1.28&r2=1.28.78.1
Delta lines:  +18 -24
---------------------
--- AConnection.cxx     2007-03-26 13:56:26+0000        1.28
+++ AConnection.cxx     2007-11-21 12:40:39+0000        1.28.78.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AConnection.cxx,v $
  *
- *  $Revision: 1.28 $
+ *  $Revision: 1.28.78.1 $
  *
- *  last change: $Author: vg $ $Date: 2007/03/26 13:56:26 $
+ *  last change: $Author: oj $ $Date: 2007/11/21 12:40:39 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -95,7 +95,6 @@
 OConnection::OConnection(ODriver*      _pDriver) throw(SQLException, 
RuntimeException)
                                                 : OSubComponent<OConnection, 
OConnection_BASE>((::cppu::OWeakObject*)_pDriver, this),
                                                 m_bClosed(sal_False),
-                                                m_xMetaData(NULL),
                                                 m_xCatalog(NULL),
                                                 m_pDriver(_pDriver),
                                                 m_pAdoConnection(NULL),
@@ -148,6 +147,8 @@
 {
        osl_incrementInterlockedCount( &m_refCount );
 
+    setConnectionInfo(info);
+
        sal_Int32 nLen = url.indexOf(':');
        nLen = url.indexOf(':',nLen+1);
        ::rtl::OUString aDSN(url.copy(nLen+1)),aUID,aPWD;
@@ -156,18 +157,18 @@
 
        sal_Int32 nTimeout = 20;
        sal_Bool bSilent = sal_True;
-       const PropertyValue *pBegin     = info.getConstArray();
-       const PropertyValue *pEnd       = pBegin + info.getLength();
-       for(;pBegin != pEnd;++pBegin)
-       {
-               if(!pBegin->Name.compareToAscii("Timeout"))
-                       pBegin->Value >>= nTimeout;
-               else if(!pBegin->Name.compareToAscii("Silent"))
-                       pBegin->Value >>= bSilent;
-               else if(!pBegin->Name.compareToAscii("user"))
-                       pBegin->Value >>= aUID;
-               else if(!pBegin->Name.compareToAscii("password"))
-                       pBegin->Value >>= aPWD;
+       const PropertyValue *pIter      = info.getConstArray();
+       const PropertyValue *pEnd       = pIter + info.getLength();
+       for(;pIter != pEnd;++pIter)
+       {
+               if(!pIter->Name.compareToAscii("Timeout"))
+                       pIter->Value >>= nTimeout;
+               else if(!pIter->Name.compareToAscii("Silent"))
+                       pIter->Value >>= bSilent;
+               else if(!pIter->Name.compareToAscii("user"))
+                       pIter->Value >>= aUID;
+               else if(!pIter->Name.compareToAscii("password"))
+                       pIter->Value >>= aPWD;
        }
 
        if(m_pAdoConnection)
@@ -513,13 +514,7 @@
 {
        ::osl::MutexGuard aGuard(m_aMutex);
 
-       //      m_aTables.disposing();
-       for (OWeakRefArray::iterator i = m_aStatements.begin(); 
m_aStatements.end() != i; ++i)
-    {
-        Reference< XInterface > xStatement( i->get() );
-        ::comphelper::disposeComponent( xStatement );
-    }
-       m_aStatements.clear();
+    OConnection_BASE::disposing();
 
        m_bClosed       = sal_True;
        m_xMetaData = ::com::sun::star::uno::WeakReference< 
::com::sun::star::sdbc::XDatabaseMetaData>();
@@ -538,7 +533,6 @@
        m_pAdoConnection = NULL;
 
        dispose_ChildImpl();
-       OConnection_BASE::disposing();
 }
 // 
-----------------------------------------------------------------------------
 sal_Int64 SAL_CALL OConnection::getSomething( const 
::com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw 
(::com::sun::star::uno::RuntimeException)

File [changed]: ADatabaseMetaData.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/ado/ADatabaseMetaData.cxx?r1=1.21&r2=1.21.152.1
Delta lines:  +7 -42
--------------------
--- ADatabaseMetaData.cxx       2006-09-17 02:11:56+0000        1.21
+++ ADatabaseMetaData.cxx       2007-11-21 12:40:39+0000        1.21.152.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: ADatabaseMetaData.cxx,v $
  *
- *  $Revision: 1.21 $
+ *  $Revision: 1.21.152.1 $
  *
- *  last change: $Author: obo $ $Date: 2006/09/17 02:11:56 $
+ *  last change: $Author: oj $ $Date: 2007/11/21 12:40:39 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -82,7 +82,7 @@
 //     using namespace connectivity;
 
 ODatabaseMetaData::ODatabaseMetaData(OConnection* _pCon)
-       : ::connectivity::ODatabaseMetaDataBase(_pCon)
+       : 
::connectivity::ODatabaseMetaDataBase(_pCon,_pCon->getConnectionInfo())
        ,m_pADOConnection(_pCon->getConnection())
        ,m_pConnection(_pCon)
 {
@@ -124,7 +124,7 @@
        return aValue;
 }
 // -------------------------------------------------------------------------
-Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo(  ) 
throw(SQLException, RuntimeException)
+Reference< XResultSet > ODatabaseMetaData::impl_getTypeInfo_throw(  )
 {
        ADORecordset *pRecordset = m_pADOConnection->getTypeInfo();
        //      ADOS::ThrowException(*m_pADOConnection,*this);
@@ -255,16 +255,6 @@
        return xRef;
 }
 // -------------------------------------------------------------------------
-Reference< XResultSet > SAL_CALL ODatabaseMetaData::getVersionColumns(
-       const Any& /*catalog*/, const ::rtl::OUString& /*schema*/, const 
::rtl::OUString& /*table*/ ) throw(SQLException, RuntimeException)
-{
-    Reference< XResultSet > xRef;
-    ::connectivity::ODatabaseMetaDataResultSet* pResult = new 
::connectivity::ODatabaseMetaDataResultSet();
-       xRef = pResult;
-       pResult->setVersionColumnsMap();
-       return xRef;
-}
-// -------------------------------------------------------------------------
 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxBinaryLiteralLength(  ) 
throw(SQLException, RuntimeException)
 {
        return getMaxSize(DBLITERAL_BINARY_LITERAL);
@@ -386,18 +376,6 @@
        return xRef;
 }
 // -------------------------------------------------------------------------
-Reference< XResultSet > SAL_CALL ODatabaseMetaData::getBestRowIdentifier(
-       const Any& /*catalog*/, const ::rtl::OUString& /*schema*/, const 
::rtl::OUString& /*table*/, sal_Int32 /*scope*/,
-       sal_Bool /*nullable*/ ) throw(SQLException, RuntimeException)
-{
-       Reference< XResultSet > xRef;
-
-    ::connectivity::ODatabaseMetaDataResultSet* pResult = new 
::connectivity::ODatabaseMetaDataResultSet();
-       xRef = pResult;
-       pResult->setBestRowIdentifierMap();
-       return xRef;
-}
-// -------------------------------------------------------------------------
 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges(
        const Any& catalog, const ::rtl::OUString& schemaPattern, const 
::rtl::OUString& tableNamePattern ) throw(SQLException, RuntimeException)
 {
@@ -415,9 +393,8 @@
        }
        else
        {
-               ::connectivity::ODatabaseMetaDataResultSet* pResult = new 
::connectivity::ODatabaseMetaDataResultSet();
+        ::connectivity::ODatabaseMetaDataResultSet* pResult = new 
::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTablePrivileges);
                xRef = pResult;
-               pResult->setTablePrivilegesMap();
                ::connectivity::ODatabaseMetaDataResultSet::ORows aRows;
                ::connectivity::ODatabaseMetaDataResultSet::ORow aRow(8);
                aRows.reserve(8);
@@ -680,13 +657,7 @@
 // -------------------------------------------------------------------------
 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes(  ) 
throw(SQLException, RuntimeException)
 {
-       // Create elements used in the array
-       Reference< XResultSet > xRef;
-
-    ::connectivity::ODatabaseMetaDataResultSet* pResult = new 
::connectivity::ODatabaseMetaDataResultSet();
-       xRef = pResult;
-       pResult->setTableTypes();
-       return xRef;
+    return new 
::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTableTypes);
 }
 // -------------------------------------------------------------------------
 sal_Int32 SAL_CALL ODatabaseMetaData::getMaxStatements(  ) throw(SQLException, 
RuntimeException)
@@ -1149,10 +1120,4 @@
     return Reference< XResultSet >();
 }
 // -------------------------------------------------------------------------
-Reference< XConnection > SAL_CALL ODatabaseMetaData::getConnection(  ) 
throw(SQLException, RuntimeException)
-{
-       return (Reference< XConnection >)m_pConnection;//new 
OConnection(m_aConnectionHandle);
-}
-// -------------------------------------------------------------------------
-
 

File [changed]: ADatabaseMetaDataImpl.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx?r1=1.8&r2=1.8.152.1
Delta lines:  +3 -4
-------------------
--- ADatabaseMetaDataImpl.cxx   2006-09-17 02:12:10+0000        1.8
+++ ADatabaseMetaDataImpl.cxx   2007-11-21 12:40:39+0000        1.8.152.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: ADatabaseMetaDataImpl.cxx,v $
  *
- *  $Revision: 1.8 $
+ *  $Revision: 1.8.152.1 $
  *
- *  last change: $Author: obo $ $Date: 2006/09/17 02:12:10 $
+ *  last change: $Author: oj $ $Date: 2007/11/21 12:40:39 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -85,7 +85,6 @@
 #include <com/sun/star/sdbcx/KeyType.hpp>
 #endif
 
-using namespace connectivity;
 using namespace connectivity::ado;
 using namespace ::com::sun::star::sdbc;
 using namespace ::com::sun::star::sdbcx;




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

Reply via email to