diff options
Diffstat (limited to 'dbaccess/source/core/api/viewcontainer.cxx')
-rw-r--r-- | dbaccess/source/core/api/viewcontainer.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/dbaccess/source/core/api/viewcontainer.cxx b/dbaccess/source/core/api/viewcontainer.cxx index ea3b8bef81d6..32fd35a7b704 100644 --- a/dbaccess/source/core/api/viewcontainer.cxx +++ b/dbaccess/source/core/api/viewcontainer.cxx @@ -136,11 +136,7 @@ ObjectType OViewContainer::appendObject( const OUString& _rForName, const Refere OUString sCommand; descriptor->getPropertyValue(PROPERTY_COMMAND) >>= sCommand; - OUStringBuffer aSQL; - aSQL.append( "CREATE VIEW " ); - aSQL.append ( sComposedName ); - aSQL.append( " AS " ); - aSQL.append ( sCommand ); + OUString aSQL = "CREATE VIEW " + sComposedName + " AS " + sCommand; Reference<XConnection> xCon = m_xConnection; OSL_ENSURE(xCon.is(),"Connection is null!"); @@ -148,7 +144,7 @@ ObjectType OViewContainer::appendObject( const OUString& _rForName, const Refere { ::utl::SharedUNOComponent< XStatement > xStmt( xCon->createStatement() ); if ( xStmt.is() ) - xStmt->execute( aSQL.makeStringAndClear() ); + xStmt->execute( aSQL ); } } |