Tag: cws_src680_dba23a User: fs Date: 2007/03/14 05:15:25 Modified: dba/connectivity/source/drivers/hsqldb/HTable.cxx
Log: #i75261# alterColumnType: don't append the column name, this will be done by ::dbtools::createStandardColumnPart (and two names are invalid HSQL syntax) File Changes: Directory: /dba/connectivity/source/drivers/hsqldb/ =================================================== File [changed]: HTable.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/hsqldb/HTable.cxx?r1=1.10&r2=1.10.74.1 Delta lines: +27 -6 -------------------- --- HTable.cxx 17 Sep 2006 02:41:11 -0000 1.10 +++ HTable.cxx 14 Mar 2007 12:15:22 -0000 1.10.74.1 @@ -4,9 +4,9 @@ * * $RCSfile: HTable.cxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.10.74.1 $ * - * last change: $Author: obo $ $Date: 2006/09/17 02:41:11 $ + * last change: $Author: fs $ $Date: 2007/03/14 12:15:22 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -98,6 +98,8 @@ #include "TConnection.hxx" #endif +#include <tools/diagnose_ex.h> + using namespace ::comphelper; using namespace connectivity::hsqldb; @@ -319,8 +321,22 @@ ::rtl::OUString sSql = getAlterTableColumnPart(); sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ALTER COLUMN ")); - sSql += ::dbtools::quoteName( getMetaData()->getIdentifierQuoteString(), _rColName ); - sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")); +#if OSL_DEBUG_LEVEL > 0 + try + { + ::rtl::OUString sDescriptorName; + OSL_ENSURE( _xDescriptor.is() + && ( _xDescriptor->getPropertyValue( OMetaConnection::getPropMap().getNameByIndex( PROPERTY_ID_NAME ) ) >>= sDescriptorName ) + && ( sDescriptorName == _rColName ), + "OHSQLTable::alterColumnType: unexpected column name!" ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } +#else + (void)_rColName; +#endif OHSQLColumn* pColumn = new OHSQLColumn(sal_True); Reference<XPropertySet> xProp = pColumn; @@ -376,7 +392,12 @@ Reference< XStatement > xStmt = getConnection()->createStatement( ); if ( xStmt.is() ) { - xStmt->execute(sSQL); + try { xStmt->execute(sSQL); } + catch( const Exception& ) + { + ::comphelper::disposeComponent(xStmt); + throw; + } ::comphelper::disposeComponent(xStmt); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
