Tag: cws_src680_nomysqlversion User: fs Date: 06/02/01 00:38:46 Modified: /dba/connectivity/source/drivers/odbc/ OConnection.cxx, ODatabaseMetaData.cxx
Log: #i60273# optional driver setting to prevent calls to getVersionColumns File Changes: Directory: /dba/connectivity/source/drivers/odbc/ ================================================= File [changed]: OConnection.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/odbc/OConnection.cxx?r1=1.33&r2=1.33.8.1 Delta lines: +7 -3 ------------------- --- OConnection.cxx 16 Jan 2006 15:04:15 -0000 1.33 +++ OConnection.cxx 1 Feb 2006 08:38:42 -0000 1.33.8.1 @@ -4,9 +4,9 @@ * * $RCSfile: OConnection.cxx,v $ * - * $Revision: 1.33 $ + * $Revision: 1.33.8.1 $ * - * last change: $Author: obo $ $Date: 2006/01/16 15:04:15 $ + * last change: $Author: fs $ $Date: 2006/02/01 08:38:42 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -99,6 +99,7 @@ ,m_nStatementCount(0) ,m_bParameterSubstitution(sal_False) ,m_bIgnoreDriverPrivileges(sal_False) + ,m_bPreventGetVersionColumns(sal_False) { m_pDriver->acquire(); ModuleContext::AddRef(); @@ -235,6 +236,7 @@ const char* pCharSet = "CharSet"; const char* pParaName = "ParameterNameSubstitution"; const char* pPrivName = "IgnoreDriverPrivileges"; + const char* pVerColName = "PreventGetVersionColumns"; // #i60273# const char* pRetrieving = "IsAutoRetrievingEnabled"; const char* pRetriStmt = "AutoRetrievingStatement"; @@ -250,6 +252,8 @@ pBegin->Value >>= bSilent; else if(!pBegin->Name.compareToAscii(pPrivName)) pBegin->Value >>= m_bIgnoreDriverPrivileges; + else if(!pBegin->Name.compareToAscii(pVerColName)) + pBegin->Value >>= m_bPreventGetVersionColumns; else if(!pBegin->Name.compareToAscii(pParaName)) pBegin->Value >>= m_bParameterSubstitution; else if(!pBegin->Name.compareToAscii(pRetrieving)) File [changed]: ODatabaseMetaData.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx?r1=1.29&r2=1.29.66.1 Delta lines: +17 -8 -------------------- --- ODatabaseMetaData.cxx 8 Sep 2005 06:33:39 -0000 1.29 +++ ODatabaseMetaData.cxx 1 Feb 2006 08:38:43 -0000 1.29.66.1 @@ -4,9 +4,9 @@ * * $RCSfile: ODatabaseMetaData.cxx,v $ * - * $Revision: 1.29 $ + * $Revision: 1.29.66.1 $ * - * last change: $Author: rt $ $Date: 2005/09/08 06:33:39 $ + * last change: $Author: fs $ $Date: 2006/02/01 08:38:43 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -274,20 +274,29 @@ const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw(SQLException, RuntimeException) { Reference< XResultSet > xRef; + bool bSuccess = false; try { + if ( !m_pConnection->preventGetVersionColumns() ) + { ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(m_pConnection); xRef = pResult; pResult->openVersionColumns(m_bUseCatalog ? catalog : Any(),schema,table); + bSuccess = true; + } } catch(SQLException&) { + } + + if ( !bSuccess ) + { ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(); xRef = pResult; pResult->setVersionColumnsMap(); } - return xRef; + return xRef; } // ------------------------------------------------------------------------- sal_Int32 SAL_CALL ODatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException, RuntimeException) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
