Kaydet (Commit) bbc9188d authored tarafından Kurt Zenker's avatar Kurt Zenker

INTEGRATION: CWS dba23a (1.10.74); FILE MERGED

2007/03/14 12:15:22 fs 1.10.74.1: #i75261# alterColumnType: don't append the column name, this will be done by ::dbtools::createStandardColumnPart (and two names are invalid HSQL syntax)
üst 4cd812bd
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: HTable.cxx,v $ * $RCSfile: HTable.cxx,v $
* *
* $Revision: 1.10 $ * $Revision: 1.11 $
* *
* last change: $Author: obo $ $Date: 2006-09-17 02:41:11 $ * last change: $Author: kz $ $Date: 2007-05-10 09:38:15 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -98,6 +98,8 @@ ...@@ -98,6 +98,8 @@
#include "TConnection.hxx" #include "TConnection.hxx"
#endif #endif
#include <tools/diagnose_ex.h>
using namespace ::comphelper; using namespace ::comphelper;
using namespace connectivity::hsqldb; using namespace connectivity::hsqldb;
...@@ -319,8 +321,22 @@ void OHSQLTable::alterColumnType(sal_Int32 nNewType,const ::rtl::OUString& _rCol ...@@ -319,8 +321,22 @@ void OHSQLTable::alterColumnType(sal_Int32 nNewType,const ::rtl::OUString& _rCol
::rtl::OUString sSql = getAlterTableColumnPart(); ::rtl::OUString sSql = getAlterTableColumnPart();
sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ALTER COLUMN ")); sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ALTER COLUMN "));
sSql += ::dbtools::quoteName( getMetaData()->getIdentifierQuoteString(), _rColName ); #if OSL_DEBUG_LEVEL > 0
sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")); 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); OHSQLColumn* pColumn = new OHSQLColumn(sal_True);
Reference<XPropertySet> xProp = pColumn; Reference<XPropertySet> xProp = pColumn;
...@@ -376,7 +392,12 @@ void OHSQLTable::executeStatement(const ::rtl::OUString& _rStatement ) ...@@ -376,7 +392,12 @@ void OHSQLTable::executeStatement(const ::rtl::OUString& _rStatement )
Reference< XStatement > xStmt = getConnection()->createStatement( ); Reference< XStatement > xStmt = getConnection()->createStatement( );
if ( xStmt.is() ) if ( xStmt.is() )
{ {
xStmt->execute(sSQL); try { xStmt->execute(sSQL); }
catch( const Exception& )
{
::comphelper::disposeComponent(xStmt);
throw;
}
::comphelper::disposeComponent(xStmt); ::comphelper::disposeComponent(xStmt);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment