Tag: cws_src680_qiq User: fs Date: 06/06/01 02:47:33 Modified: /dba/connectivity/source/parse/ sqlnode.cxx
Log: #i51143# only substitute sub queries if the connection really supports this File Changes: Directory: /dba/connectivity/source/parse/ ========================================== File [changed]: sqlnode.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/parse/sqlnode.cxx?r1=1.38.62.5&r2=1.38.62.6 Delta lines: +14 -9 -------------------- --- sqlnode.cxx 15 May 2006 14:43:05 -0000 1.38.62.5 +++ sqlnode.cxx 1 Jun 2006 09:47:31 -0000 1.38.62.6 @@ -4,9 +4,9 @@ * * $RCSfile: sqlnode.cxx,v $ * - * $Revision: 1.38.62.5 $ + * $Revision: 1.38.62.6 $ * - * last change: $Author: fs $ $Date: 2006/05/15 14:43:05 $ + * last change: $Author: fs $ $Date: 2006/06/01 09:47:31 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -122,6 +122,9 @@ #ifndef _CONNECTIVITY_DBTOOLS_HXX_ #include "connectivity/dbtools.hxx" #endif +#ifndef CONNECTIVITY_INC_CONNECTIVITY_DBMETADATA_HXX +#include "connectivity/dbmetadata.hxx" +#endif #ifndef TOOLS_DIAGNOSE_EX_H #include <tools/diagnose_ex.h> #endif @@ -307,10 +310,14 @@ SQLParseNodeParameter aParseParam( xMeta->getIdentifierQuoteString(), xMeta->getCatalogSeparator(), NULL, NULL, OParseContext::getDefaultLocale(), NULL, false, true, '.', false, true ); + DatabaseMetaData aMeta( _rxConnection ); + if ( aMeta.supportsSubqueriesInFrom() ) + { Reference< XQueriesSupplier > xSuppQueries( _rxConnection, UNO_QUERY ); OSL_ENSURE( xSuppQueries.is(), "OSQLParseNode::parseNodeToExecutableStatement: cannot substitute everything without a QueriesSupplier!" ); if ( xSuppQueries.is() ) aParseParam.xQueries = xSuppQueries->getQueries(); + } aParseParam.pParser = &_rParser; @@ -565,10 +572,8 @@ return false; if ( !rParam.xQueries.is() ) - { - OSL_ENSURE( false, "OSQLParseNode::tableNameNodeToStr: cannot substitute a (possible) query name!" ); + // connection does not support queries in queries, or was no query supplier return false; - } try { --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
