Tag: cws_src680_qiq
User: fs      
Date: 2006/06/30 06:23:38

Modified:
   dba/dbaccess/source/core/api/BookmarkSet.cxx
   dba/dbaccess/source/core/api/KeySet.cxx
   dba/dbaccess/source/core/api/CacheSet.cxx
   dba/dbaccess/source/core/api/StaticSet.cxx

Log:
 during #i51143#: PROPERTY_ID_HY0000 superseded by 
StandardSQLState.SQL_GENERAL_ERROR

File Changes:

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

File [changed]: BookmarkSet.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/BookmarkSet.cxx?r1=1.17&r2=1.17.2.1
Delta lines:  +13 -8
--------------------
--- BookmarkSet.cxx     20 Jun 2006 02:32:54 -0000      1.17
+++ BookmarkSet.cxx     30 Jun 2006 13:23:35 -0000      1.17.2.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: BookmarkSet.cxx,v $
  *
- *  $Revision: 1.17 $
+ *  $Revision: 1.17.2.1 $
  *
- *  last change: $Author: hr $ $Date: 2006/06/20 02:32:54 $
+ *  last change: $Author: fs $ $Date: 2006/06/30 13:23:35 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -44,10 +44,15 @@
 #ifndef _COM_SUN_STAR_SDBC_XRESULTSETUPDATE_HPP_
 #include <com/sun/star/sdbc/XResultSetUpdate.hpp>
 #endif
+#ifndef _DBHELPER_DBEXCEPTION_HXX_
+#include <connectivity/dbexception.hxx>
+#endif
+
 #include <limits>
 
 using namespace dbaccess;
-using namespace connectivity;
+using namespace ::connectivity;
+using namespace ::dbtools;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::sdbc;
@@ -109,7 +114,7 @@
 {
        Reference<XRowUpdate> xUpdRow(m_xRowLocate,UNO_QUERY);
        if(!xUpdRow.is())
-               throw 
SQLException(DBACORE_RESSTRING(RID_STR_NO_XROWUPDATE),*this,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HY000")),1000,Any());
+        ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_XROWUPDATE 
), SQL_GENERAL_ERROR, *this );
 
        Reference<XResultSetUpdate> xUpd(m_xRowLocate,UNO_QUERY);
        if(xUpd.is())
@@ -125,7 +130,7 @@
                (*_rInsertRow->begin()) = m_xRowLocate->getBookmark();
        }
        else
-               throw 
SQLException(DBACORE_RESSTRING(RID_STR_NO_XRESULTSETUPDATE),*this,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HY000")),1000,Any());
+        ::dbtools::throwSQLException( DBACORE_RESSTRING( 
RID_STR_NO_XRESULTSETUPDATE ), SQL_GENERAL_ERROR, *this );
 }
 // -------------------------------------------------------------------------
 void SAL_CALL OBookmarkSet::updateRow(const ORowSetRow& _rInsertRow ,const 
ORowSetRow& _rOrginalRow,const connectivity::OSQLTable& /*_xTable*/  ) 
throw(SQLException, RuntimeException)
@@ -133,7 +138,7 @@
        //      OCacheSet::updateRow( _rInsertRow,_rOrginalRow,_xTable);
        Reference<XRowUpdate> xUpdRow(m_xRowLocate,UNO_QUERY);
        if(!xUpdRow.is())
-               throw 
SQLException(DBACORE_RESSTRING(RID_STR_NO_XROWUPDATE),*this,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HY000")),1000,Any());
+        ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_XROWUPDATE 
), SQL_GENERAL_ERROR, *this );
 
        sal_Int32 i = 1;
        connectivity::ORowVector< ORowSetValue > ::const_iterator aOrgIter = 
_rOrginalRow->begin()+1;
@@ -148,7 +153,7 @@
        if(xUpd.is())
                xUpd->updateRow();
        else
-               throw 
SQLException(DBACORE_RESSTRING(RID_STR_NO_XRESULTSETUPDATE),*this,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HY000")),1000,Any());
+        ::dbtools::throwSQLException( DBACORE_RESSTRING( 
RID_STR_NO_XRESULTSETUPDATE ), SQL_GENERAL_ERROR, *this );
 }
 // -------------------------------------------------------------------------
 void SAL_CALL OBookmarkSet::deleteRow(const ORowSetRow& /*_rDeleteRow*/ ,const 
connectivity::OSQLTable& /*_xTable*/  ) throw(SQLException, RuntimeException)

File [changed]: KeySet.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/KeySet.cxx?r1=1.60.2.3&r2=1.60.2.4
Delta lines:  +14 -9
--------------------
--- KeySet.cxx  27 Jun 2006 11:53:54 -0000      1.60.2.3
+++ KeySet.cxx  30 Jun 2006 13:23:35 -0000      1.60.2.4
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: KeySet.cxx,v $
  *
- *  $Revision: 1.60.2.3 $
+ *  $Revision: 1.60.2.4 $
  *
- *  last change: $Author: fs $ $Date: 2006/06/27 11:53:54 $
+ *  last change: $Author: fs $ $Date: 2006/06/30 13:23:35 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -93,6 +93,9 @@
 #ifndef _CONNECTIVITY_DBTOOLS_HXX_
 #include <connectivity/dbtools.hxx>
 #endif
+#ifndef _DBHELPER_DBEXCEPTION_HXX_
+#include <connectivity/dbexception.hxx>
+#endif
 #include <list>
 #include <algorithm>
 #ifndef _COM_SUN_STAR_IO_XINPUTSTREAM_HPP_
@@ -112,7 +115,8 @@
 #endif
 
 using namespace dbaccess;
-using namespace connectivity;
+using namespace ::connectivity;
+using namespace ::dbtools;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::sdbc;
@@ -463,7 +467,7 @@
                aSql += sSetValues;
        }
        else
-               throw 
SQLException(DBACORE_RESSTRING(RID_STR_NO_VALUE_CHANGED),m_xConnection,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HY0000")),1000,Any());
+        ::dbtools::throwSQLException( DBACORE_RESSTRING( 
RID_STR_NO_VALUE_CHANGED ), SQL_GENERAL_ERROR, m_xConnection );
 
        if(sKeyCondition.getLength() || sIndexCondition.getLength())
        {
@@ -487,8 +491,7 @@
                aSql += aCondition;
        }
        else
-               throw 
SQLException(DBACORE_RESSTRING(RID_STR_NO_CONDITION_FOR_PK),m_xConnection,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HY0000")),1000,Any());
-
+        ::dbtools::throwSQLException( DBACORE_RESSTRING( 
RID_STR_NO_CONDITION_FOR_PK ), SQL_GENERAL_ERROR, m_xConnection );
 
        // now create end execute the prepared statement
        Reference< XPreparedStatement > 
xPrep(m_xConnection->prepareStatement(aSql));
@@ -564,7 +567,7 @@
                }
        }
     if ( !bModified )
-        throw 
SQLException(DBACORE_RESSTRING(RID_STR_NO_VALUE_CHANGED),m_xConnection,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HY0000")),1000,Any());
+        ::dbtools::throwSQLException( DBACORE_RESSTRING( 
RID_STR_NO_VALUE_CHANGED ), SQL_GENERAL_ERROR, m_xConnection );
 
        aSql = 
aSql.replaceAt(aSql.getLength()-1,1,::rtl::OUString::createFromAscii(")"));
        aValues = 
aValues.replaceAt(aValues.getLength()-1,1,::rtl::OUString::createFromAscii(")"));
@@ -1040,7 +1043,9 @@
 {
        // fetch the next row and append on the keyset
        sal_Bool bRet = sal_False;
-       if(!m_bRowCountFinal && (bRet = m_xDriverSet->next()))
+       if ( !m_bRowCountFinal )
+        bRet = m_xDriverSet->next();
+    if ( bRet )
        {
                ORowSetRow aKeyRow = new connectivity::ORowVector< ORowSetValue 
>((*m_pKeyColumnNames).size());
                connectivity::ORowVector< ORowSetValue >::iterator aIter = 
aKeyRow->begin();

File [changed]: CacheSet.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/CacheSet.cxx?r1=1.40.118.2&r2=1.40.118.3
Delta lines:  +5 -4
-------------------
--- CacheSet.cxx        27 Jun 2006 11:53:24 -0000      1.40.118.2
+++ CacheSet.cxx        30 Jun 2006 13:23:35 -0000      1.40.118.3
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: CacheSet.cxx,v $
  *
- *  $Revision: 1.40.118.2 $
+ *  $Revision: 1.40.118.3 $
  *
- *  last change: $Author: fs $ $Date: 2006/06/27 11:53:24 $
+ *  last change: $Author: fs $ $Date: 2006/06/30 13:23:35 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -379,7 +379,8 @@
                aSql += aCondition;
        }
        else
-               throw 
SQLException(DBACORE_RESSTRING(RID_STR_NO_UPDATE_MISSING_CONDITION),*this,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HY000")),1000,Any());
+        ::dbtools::throwSQLException(
+            DBACORE_RESSTRING( RID_STR_NO_UPDATE_MISSING_CONDITION ), 
SQL_GENERAL_ERROR, *this );
 
        // now create end execute the prepared statement
        Reference< XPreparedStatement > 
xPrep(m_xConnection->prepareStatement(aSql));

File [changed]: StaticSet.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/StaticSet.cxx?r1=1.16&r2=1.16.2.1
Delta lines:  +6 -4
-------------------
--- StaticSet.cxx       20 Jun 2006 02:37:45 -0000      1.16
+++ StaticSet.cxx       30 Jun 2006 13:23:35 -0000      1.16.2.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: StaticSet.cxx,v $
  *
- *  $Revision: 1.16 $
+ *  $Revision: 1.16.2.1 $
  *
- *  last change: $Author: hr $ $Date: 2006/06/20 02:37:45 $
+ *  last change: $Author: fs $ $Date: 2006/06/30 13:23:35 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -118,7 +118,9 @@
 sal_Bool OStaticSet::fetchRow()
 {
        sal_Bool bRet = sal_False;
-       if(!m_bEnd && (bRet = m_xDriverSet->next()))
+       if ( !m_bEnd )
+        bRet = m_xDriverSet->next();
+    if ( bRet )
        {
                m_aSet.push_back(new connectivity::ORowVector< 
connectivity::ORowSetValue >(m_xSetMetaData->getColumnCount()));
                m_aSetIter = m_aSet.end() - 1;




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

Reply via email to