Tag: cws_src680_qiq
User: fs      
Date: 06/05/19 01:16:01

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

Log:
 #i51143# more fine grained error messages about existing tables/queries

File Changes:

Directory: /dba/connectivity/source/parse/
==========================================

File [changed]: sqliterator.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/parse/sqliterator.cxx?r1=1.46.78.3&r2=1.46.78.4
Delta lines:  +13 -4
--------------------
--- sqliterator.cxx     16 May 2006 20:09:21 -0000      1.46.78.3
+++ sqliterator.cxx     19 May 2006 08:15:57 -0000      1.46.78.4
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: sqliterator.cxx,v $
  *
- *  $Revision: 1.46.78.3 $
+ *  $Revision: 1.46.78.4 $
  *
- *  last change: $Author: fs $ $Date: 2006/05/16 20:09:21 $
+ *  last change: $Author: fs $ $Date: 2006/05/19 08:15:57 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -373,7 +373,9 @@
         // this is worth an error
         if ( SQL_STATEMENT_CREATE_TABLE == m_eStatementType )
         {
-            if ( bQueryDoesExist || bTableDoesExist )
+            if ( bQueryDoesExist )
+                impl_appendError( IParseContext::ERROR_INVALID_QUERY_EXIST, 
&sName );
+            else if ( bTableDoesExist )
                 impl_appendError( IParseContext::ERROR_INVALID_TABLE_EXIST, 
&sName );
             else
                 aReturn = impl_createTableObject( sName, sCatalog, sSchema );
@@ -397,7 +399,14 @@
             else if ( bTableDoesExist )
                 m_pImpl->m_xTableContainer->getByName( sComposedName ) >>= 
aReturn;
             else
+            {
+                if ( m_pImpl->m_xQueryContainer.is() )
+                    // the connection on which we're working supports sub 
queries in from (else
+                    // m_xQueryContainer would not have been set), so emit a 
better error message
+                    impl_appendError( 
IParseContext::ERROR_INVALID_TABLE_OR_QUERY, &sName );
+                else
                 impl_appendError( IParseContext::ERROR_INVALID_TABLE, &sName );
+            }
         }
        }
        catch(Exception&)




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

Reply via email to