User: obo Date: 2006/07/10 07:27:10 Modified: dba/connectivity/source/drivers/file/FStatement.cxx
Log: INTEGRATION: CWS qiq (1.38.96); FILE MERGED 2006/06/28 08:45:20 fs 1.38.96.4: #i10000# 2006/06/27 14:22:04 fs 1.38.96.3: RESYNC: (1.38-1.39); FILE MERGED 2006/05/16 20:10:52 fs 1.38.96.2: #i51143# changed signature of OSQLParseTreeIterator 2006/05/10 10:51:22 fs 1.38.96.1: #i51443# changed API of the OSQLParseIterator File Changes: Directory: /dba/connectivity/source/drivers/file/ ================================================= File [changed]: FStatement.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/file/FStatement.cxx?r1=1.39&r2=1.40 Delta lines: +21 -22 --------------------- --- FStatement.cxx 20 Jun 2006 01:26:32 -0000 1.39 +++ FStatement.cxx 10 Jul 2006 14:27:07 -0000 1.40 @@ -103,11 +103,12 @@ DBG_NAME( file_OStatement_Base ) //------------------------------------------------------------------------------ -OStatement_Base::OStatement_Base(OConnection* _pConnection ) : OStatement_BASE(m_aMutex) +OStatement_Base::OStatement_Base(OConnection* _pConnection ) + :OStatement_BASE(m_aMutex) ,::comphelper::OPropertyContainer(OStatement_BASE::rBHelper) ,m_xDBMetaData(_pConnection->getMetaData()) ,m_aParser(_pConnection->getDriver()->getFactory()) - ,m_aSQLIterator(_pConnection->createCatalog()->getTables(),_pConnection->getMetaData(),NULL,&m_aParser) + ,m_aSQLIterator( _pConnection, _pConnection->createCatalog()->getTables(), m_aParser, NULL ) ,m_pConnection(_pConnection) ,m_pParseTree(NULL) ,m_pSQLAnalyzer(NULL) @@ -287,7 +288,6 @@ ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - return makeAny(m_aLastWarning); } // ------------------------------------------------------------------------- @@ -296,7 +296,6 @@ ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - m_aLastWarning = SQLWarning(); } // ------------------------------------------------------------------------- @@ -337,7 +336,7 @@ executeQuery(sql); - return m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT || m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT_COUNT; + return m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT; } // ------------------------------------------------------------------------- @@ -501,19 +500,19 @@ // no tables -> nothing to operate on -> error throwGenericSQLException( ::rtl::OUString::createFromAscii("The statement is invalid. It contains no valid table."), static_cast<XWeak*>(this), - makeAny(m_aSQLIterator.getWarning())); + makeAny( m_aSQLIterator.getErrors() ) ); - if ( xTabs.size() > 1 || m_aSQLIterator.getWarning().Message.getLength() ) + if ( xTabs.size() > 1 || m_aSQLIterator.hasErrors() ) // more than one table -> can't operate on them -> error throwGenericSQLException( ::rtl::OUString::createFromAscii("The statement is invalid. It contains more than one table."), static_cast<XWeak*>(this), - makeAny(m_aSQLIterator.getWarning())); + makeAny( m_aSQLIterator.getErrors() ) ); - if ( (m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT || m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT_COUNT) && m_aSQLIterator.getSelectColumns()->empty() ) + if ( (m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT) && m_aSQLIterator.getSelectColumns()->empty() ) // SELECT statement without columns -> error throwGenericSQLException( ::rtl::OUString::createFromAscii("The statement is invalid. It contains no valid column names."), static_cast<XWeak*>(this), - makeAny(m_aSQLIterator.getWarning())); + makeAny( m_aSQLIterator.getErrors() ) ); if ( m_aSQLIterator.getStatementType() == SQL_STATEMENT_CREATE_TABLE ) // CREATE TABLE is not supported at all --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]