User: hr      
Date: 2006/08/15 03:57:42

Modified:
   dba/dbaccess/source/core/api/RowSet.cxx

Log:
 INTEGRATION: CWS dba30 (1.133.12); FILE MERGED
 2006/07/19 12:08:49 fs 1.133.12.10: RESYNC: (1.143-1.145); FILE MERGED
 2006/05/08 11:17:30 fs 1.133.12.9: RESYNC: (1.142-1.143); FILE MERGED
 2006/03/22 19:36:41 fs 1.133.12.8: #i10000#
 2006/03/21 18:20:17 fs 1.133.12.7: RESYNC: (1.137-1.142); FILE MERGED
 2006/01/02 09:17:06 oj 1.133.12.6: #i44200# use 
supportsMixedCaseQuotedIdentifiers where storesMixedCaseQuotedIdentifiers was 
used
 2005/12/22 12:50:11 fs 1.133.12.5: localize the error message telling about a 
non-existent table. Encountered during investigating issue #i59594#
 2005/10/13 14:49:01 fs 1.133.12.4: RESYNC: (1.135-1.137); FILE MERGED
 2005/09/30 06:00:14 fs 1.133.12.3: RESYNC: (1.133-1.135); FILE MERGED
 2005/08/22 14:54:37 fs 1.133.12.2: some minor speedups in the query composer, 
and some RTL_LOGs for #i48403#
 2005/04/06 07:14:11 fs 1.133.12.1: #i46768# getPropertyDefaultByHandle 
signature changed

File Changes:

Directory: /dba/dbaccess/source/core/api/
=========================================

File [changed]: RowSet.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/RowSet.cxx?r1=1.146&r2=1.147
Delta lines:  +39 -34
---------------------
--- RowSet.cxx  4 Aug 2006 13:55:11 -0000       1.146
+++ RowSet.cxx  15 Aug 2006 10:57:40 -0000      1.147
@@ -188,6 +188,9 @@
 #ifndef INCLUDED_SVTOOLS_SYSLOCALE_HXX
 #include <svtools/syslocale.hxx>
 #endif
+#ifndef _RTL_LOGFILE_HXX_
+#include <rtl/logfile.hxx>
+#endif
 
 using namespace utl;
 using namespace dbaccess;
@@ -352,46 +355,44 @@
 }
 
 // 
-----------------------------------------------------------------------------
-Any ORowSet::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
+void ORowSet::getPropertyDefaultByHandle( sal_Int32 _nHandle, Any& _rDefault ) 
const
 {
-       Any aRet;
        switch( _nHandle )
        {
                case PROPERTY_ID_COMMANDTYPE:
-                       aRet <<= static_cast<sal_Int32>(CommandType::COMMAND);
+                       _rDefault <<= 
static_cast<sal_Int32>(CommandType::COMMAND);
                        break;
                case PROPERTY_ID_IGNORERESULT:
-                       aRet <<= sal_False;
+                       _rDefault <<= sal_False;
                        break;
                case PROPERTY_ID_APPLYFILTER:
-                       aRet <<= sal_False;
+                       _rDefault <<= sal_False;
                        break;
                case PROPERTY_ID_ISMODIFIED:
-                       aRet <<= sal_False;
+                       _rDefault <<= sal_False;
                        break;
                case PROPERTY_ID_ISBOOKMARKABLE:
-                       aRet <<= sal_True;
+                       _rDefault <<= sal_True;
                        break;
                case PROPERTY_ID_CANUPDATEINSERTEDROWS:
-                       aRet <<= sal_True;
+                       _rDefault <<= sal_True;
                        break;
                case PROPERTY_ID_RESULTSETTYPE:
-                       aRet <<= ResultSetType::SCROLL_INSENSITIVE;
+                       _rDefault <<= ResultSetType::SCROLL_INSENSITIVE;
                        break;
                case PROPERTY_ID_RESULTSETCONCURRENCY:
-                       aRet <<= ResultSetConcurrency::UPDATABLE;
+                       _rDefault <<= ResultSetConcurrency::UPDATABLE;
                        break;
                case PROPERTY_ID_FETCHDIRECTION:
-                       aRet <<= FetchDirection::FORWARD;
+                       _rDefault <<= FetchDirection::FORWARD;
                        break;
                case PROPERTY_ID_FETCHSIZE:
-                       aRet <<= static_cast<sal_Int32>(1);
+                       _rDefault <<= static_cast<sal_Int32>(1);
                        break;
                case PROPERTY_ID_USE_ESCAPE_PROCESSING:
-                       aRet <<= sal_True;
+                       _rDefault <<= sal_True;
                        break;
        }
-       return aRet;
 }
 // -------------------------------------------------------------------------
 //     typedef ::comphelper::OPropertyArrayUsageHelper<ORowSet> ORowSet_Prop;
@@ -1712,6 +1713,8 @@
 // 
-----------------------------------------------------------------------------
 void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& 
_rClearForNotification)
 {
+       RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "[EMAIL PROTECTED]", 
"ORowSet::execute_NoApprove_NoNewConn" );
+
        // now we can dispose our old connection
        ::comphelper::disposeComponent(m_xOldConnection);
        m_xOldConnection = NULL;
@@ -1728,6 +1731,8 @@
                if ( m_aUpdateTableName.getLength() )
                        aComposedUpdateTableName = composeTableName( 
m_xActiveConnection->getMetaData(), m_aUpdateCatalogName, m_aUpdateSchemaName, 
m_aUpdateTableName, sal_False, ::dbtools::eInDataManipulation );
 
+        {
+            RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "[EMAIL 
PROTECTED]", "ORowSet::execute_NoApprove_NoNewConn: creating cache" );
                m_pCache = new 
ORowSetCache(xResultSet,m_xComposer.get(),m_xServiceManager,aComposedUpdateTableName,m_bModified,m_bNew);
                if ( m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY 
)
                {
@@ -1737,6 +1742,8 @@
                m_pCache->setMaxRowSize(m_nFetchSize);
                m_aCurrentRow   = m_pCache->createIterator(this);
                m_aOldRow = m_pCache->registerOldRow();
+        }
+
                // now we can clear the parameter row
                m_aParameterRow.clear();
 
@@ -1759,6 +1766,7 @@
 
                if(!m_xColumns.is())
                {
+            RTL_LOGFILE_CONTEXT_AUTHOR( aColumnCreateLog, "dbaccess", "[EMAIL 
PROTECTED]", "ORowSet::execute_NoApprove_NoNewConn::creating columns" );
                        // use the meta data
                        Reference<XResultSetMetaDataSupplier> 
xMetaSup(m_xStatement,UNO_QUERY);
                        try
@@ -2188,8 +2196,8 @@
                case CommandType::TABLE:
                {
             impl_resetTables_nothrow();
-            Reference< XNameAccess > xTables( impl_getTables_throw() );
 
+            Reference< XNameAccess > xTables( impl_getTables_throw() );
             if ( xTables->hasByName(m_aCommand) )
                        {
                                Reference< XPropertySet > xTable;
@@ -2219,11 +2227,9 @@
                        }
                        else
                        {
-                               ::rtl::OUString 
sError(RTL_CONSTASCII_USTRINGPARAM("There exists no table with given name: 
\""));
-                               sError += m_aCommand;
-                               sError += 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"!"));
-                               throwGenericSQLException(sError,*this);
-                // TODO: resource
+                String sMessage( DBACORE_RESSTRING( 
RID_STR_TABLE_DOES_NOT_EXIST ) );
+                sMessage.SearchAndReplaceAscii( "$table$", m_aCommand );
+                throwGenericSQLException(sMessage,*this);
                        }
                }
         break;
@@ -2257,10 +2263,9 @@
                                }
                                else
                                {
-                                       ::rtl::OUString 
sError(RTL_CONSTASCII_USTRINGPARAM("There exists no query with given name: 
\""));
-                                       sError += m_aCommand;
-                                       sError += 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"!"));
-                                       throwGenericSQLException(sError,*this);
+                    String sMessage( DBACORE_RESSTRING( 
RID_STR_TABLE_DOES_NOT_EXIST ) );
+                    sMessage.SearchAndReplaceAscii( "$table$", m_aCommand );
+                    throwGenericSQLException(sMessage,*this);
                                }
                        }
                        else




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

Reply via email to