Tag: cws_src680_qiq
User: fs      
Date: 2006/06/30 06:19:39

Modified:
   dba/connectivity/source/parse/sqlnode.cxx
   dba/connectivity/source/parse/sqliterator.cxx

Log:
 #i51143# localize the error message about cyclic sub queries

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.11&r2=1.38.62.12
Delta lines:  +8 -3
-------------------
--- sqlnode.cxx 30 Jun 2006 13:06:25 -0000      1.38.62.11
+++ sqlnode.cxx 30 Jun 2006 13:19:36 -0000      1.38.62.12
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: sqlnode.cxx,v $
  *
- *  $Revision: 1.38.62.11 $
+ *  $Revision: 1.38.62.12 $
  *
- *  last change: $Author: fs $ $Date: 2006/06/30 13:06:25 $
+ *  last change: $Author: fs $ $Date: 2006/06/30 13:19:36 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -666,7 +666,12 @@
 
         // avoid recursion (e.g. "foo" defined as "SELECT * FROM bar" and 
"bar" defined as "SELECT * FROM foo".
         if ( rParam.pSubQueryHistory->find( sTableOrQueryName ) != 
rParam.pSubQueryHistory->end() )
-            ::dbtools::throwSQLException( "cyclic sub queries", 
SQL_CYCLIC_SUB_QUERIES, NULL );
+        {
+            ::rtl::OUString sMessage( ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( "cyclic sub queries" ) ) );
+            if ( rParam.pParser )
+                sMessage = rParam.pParser->getContext().getErrorMessage( 
ERROR_CYCLIC_SUB_QUERIES );
+            ::dbtools::throwSQLException( sMessage, SQL_CYCLIC_SUB_QUERIES, 
NULL );
+        }
         rParam.pSubQueryHistory->insert( sTableOrQueryName );
 
         Reference< XPropertySet > xQuery( rParam.xQueries->getByName( 
sTableOrQueryName ), UNO_QUERY_THROW );

File [changed]: sqliterator.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/parse/sqliterator.cxx?r1=1.46.78.12&r2=1.46.78.13
Delta lines:  +3 -3
-------------------
--- sqliterator.cxx     30 Jun 2006 13:06:25 -0000      1.46.78.12
+++ sqliterator.cxx     30 Jun 2006 13:19:37 -0000      1.46.78.13
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: sqliterator.cxx,v $
  *
- *  $Revision: 1.46.78.12 $
+ *  $Revision: 1.46.78.13 $
  *
- *  last change: $Author: fs $ $Date: 2006/06/30 13:06:25 $
+ *  last change: $Author: fs $ $Date: 2006/06/30 13:19:37 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -439,7 +439,7 @@
                 if  ( !m_pImpl->isQueryAllowed( sComposedName ) )
                 {
                     impl_appendError( SQLException(
-                        ::rtl::OUString::createFromAscii( "cyclic sub queries" 
),
+                        m_rParser.getContext().getErrorMessage( 
ERROR_CYCLIC_SUB_QUERIES )
                         NULL,
                         getStandardSQLState( SQL_CYCLIC_SUB_QUERIES ),
                         0,




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

Reply via email to