summaryrefslogtreecommitdiffstats
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-25 13:38:38 +0200
committerNoel Grandin <noel@peralex.com>2016-02-25 13:50:26 +0200
commit414a66587b73dfc69c121118e9a6337de4e843d2 (patch)
tree425457f56fc3454bcea051b702fb8fa7340eea34 /dbaccess
parentconvert SQLNodeType to scoped enum (diff)
downloadcore-414a66587b73dfc69c121118e9a6337de4e843d2.tar.gz
core-414a66587b73dfc69c121118e9a6337de4e843d2.zip
convert StandardSQLState to scoped enum
Change-Id: Ia0a1526140cfed35a73a6fea1a173d2fb5005960
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/api/BookmarkSet.cxx8
-rw-r--r--dbaccess/source/core/api/CacheSet.cxx2
-rw-r--r--dbaccess/source/core/api/KeySet.cxx6
-rw-r--r--dbaccess/source/core/api/OptimisticSet.cxx6
-rw-r--r--dbaccess/source/core/api/RowSet.cxx28
-rw-r--r--dbaccess/source/core/api/RowSetBase.cxx10
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx6
-rw-r--r--dbaccess/source/core/api/query.cxx2
-rw-r--r--dbaccess/source/core/api/resultset.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/QueryTableView.cxx2
-rw-r--r--dbaccess/source/ui/uno/copytablewizard.cxx4
11 files changed, 39 insertions, 39 deletions
diff --git a/dbaccess/source/core/api/BookmarkSet.cxx b/dbaccess/source/core/api/BookmarkSet.cxx
index 154af39be47c..faca63120942 100644
--- a/dbaccess/source/core/api/BookmarkSet.cxx
+++ b/dbaccess/source/core/api/BookmarkSet.cxx
@@ -76,7 +76,7 @@ void SAL_CALL OBookmarkSet::insertRow( const ORowSetRow& _rInsertRow,const conne
{
Reference<XRowUpdate> xUpdRow(m_xRowLocate,UNO_QUERY);
if(!xUpdRow.is())
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_XROWUPDATE ), SQL_GENERAL_ERROR, *this );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_XROWUPDATE ), StandardSQLState::GENERAL_ERROR, *this );
Reference<XResultSetUpdate> xUpd(m_xRowLocate,UNO_QUERY);
if(xUpd.is())
@@ -93,14 +93,14 @@ void SAL_CALL OBookmarkSet::insertRow( const ORowSetRow& _rInsertRow,const conne
(*_rInsertRow->get().begin()) = m_xRowLocate->getBookmark();
}
else
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_XRESULTSETUPDATE ), SQL_GENERAL_ERROR, *this );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_XRESULTSETUPDATE ), StandardSQLState::GENERAL_ERROR, *this );
}
void SAL_CALL OBookmarkSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOriginalRow,const connectivity::OSQLTable& /*_xTable*/ ) throw(SQLException, RuntimeException, std::exception)
{
Reference<XRowUpdate> xUpdRow(m_xRowLocate,UNO_QUERY);
if(!xUpdRow.is())
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_XROWUPDATE ), SQL_GENERAL_ERROR, *this );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_XROWUPDATE ), StandardSQLState::GENERAL_ERROR, *this );
sal_Int32 i = 1;
connectivity::ORowVector< ORowSetValue > ::Vector::const_iterator aOrgIter = _rOriginalRow->get().begin()+1;
@@ -116,7 +116,7 @@ void SAL_CALL OBookmarkSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowS
if(xUpd.is())
xUpd->updateRow();
else
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_XRESULTSETUPDATE ), SQL_GENERAL_ERROR, *this );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_XRESULTSETUPDATE ), StandardSQLState::GENERAL_ERROR, *this );
}
void SAL_CALL OBookmarkSet::deleteRow(const ORowSetRow& /*_rDeleteRow*/ ,const connectivity::OSQLTable& /*_xTable*/ ) throw(SQLException, RuntimeException)
diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx
index 5618df02005c..5bb75ba892ae 100644
--- a/dbaccess/source/core/api/CacheSet.cxx
+++ b/dbaccess/source/core/api/CacheSet.cxx
@@ -296,7 +296,7 @@ void SAL_CALL OCacheSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetR
}
else
::dbtools::throwSQLException(
- DBACORE_RESSTRING( RID_STR_NO_UPDATE_MISSING_CONDITION ), SQL_GENERAL_ERROR, *this );
+ DBACORE_RESSTRING( RID_STR_NO_UPDATE_MISSING_CONDITION ), StandardSQLState::GENERAL_ERROR, *this );
// now create end execute the prepared statement
Reference< XPreparedStatement > xPrep(m_xConnection->prepareStatement(aSql.makeStringAndClear()));
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index 12e74c4dfbf5..b24e44f3efca 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -526,7 +526,7 @@ void SAL_CALL OKeySet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow
aSql.setLength(aSql.getLength()-1);
}
else
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_VALUE_CHANGED ), SQL_GENERAL_ERROR, m_xConnection );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_VALUE_CHANGED ), StandardSQLState::GENERAL_ERROR, m_xConnection );
if(!sKeyCondition.isEmpty() || !sIndexCondition.isEmpty())
{
@@ -546,7 +546,7 @@ void SAL_CALL OKeySet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow
aSql.setLength(aSql.getLength()-5); // remove the last AND
}
else
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_CONDITION_FOR_PK ), SQL_GENERAL_ERROR, m_xConnection );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_CONDITION_FOR_PK ), StandardSQLState::GENERAL_ERROR, m_xConnection );
// now create end execute the prepared statement
executeUpdate(_rInsertRow ,_rOriginalRow,aSql.makeStringAndClear(),"",aIndexColumnPositions);
@@ -650,7 +650,7 @@ void SAL_CALL OKeySet::insertRow( const ORowSetRow& _rInsertRow,const connectivi
}
}
if ( !bModified )
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_VALUE_CHANGED ), SQL_GENERAL_ERROR, m_xConnection );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_VALUE_CHANGED ), StandardSQLState::GENERAL_ERROR, m_xConnection );
aSql[aSql.getLength() - 1] = ')';
aValues[aValues.getLength() - 1] = ')';
diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx
index 67f6850f8684..154ed3d1993b 100644
--- a/dbaccess/source/core/api/OptimisticSet.cxx
+++ b/dbaccess/source/core/api/OptimisticSet.cxx
@@ -210,10 +210,10 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow
}
if( aSql.empty() )
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_VALUE_CHANGED ), SQL_GENERAL_ERROR, m_xConnection );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_VALUE_CHANGED ), StandardSQLState::GENERAL_ERROR, m_xConnection );
if( aKeyConditions.empty() )
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_CONDITION_FOR_PK ), SQL_GENERAL_ERROR, m_xConnection );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_CONDITION_FOR_PK ), StandardSQLState::GENERAL_ERROR, m_xConnection );
static const char s_sUPDATE[] = "UPDATE ";
static const char s_sSET[] = " SET ";
@@ -280,7 +280,7 @@ void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const conn
}
}
if ( aParameter.empty() )
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_VALUE_CHANGED ), SQL_GENERAL_ERROR, m_xConnection );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_VALUE_CHANGED ), StandardSQLState::GENERAL_ERROR, m_xConnection );
Reference<XDatabaseMetaData> xMetaData = m_xConnection->getMetaData();
static const char s_sINSERT[] = "INSERT INTO ";
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index 3762ec59cbf6..74d3e793ecdd 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -973,7 +973,7 @@ void SAL_CALL ORowSet::updateRow( ) throw(SQLException, RuntimeException, std::
}
else if ( !m_bAfterLast ) // the update went wrong
{
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_UPDATE_FAILED ), SQL_INVALID_CURSOR_POSITION, *this );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_UPDATE_FAILED ), StandardSQLState::INVALID_CURSOR_POSITION, *this );
}
}
}
@@ -986,15 +986,15 @@ void SAL_CALL ORowSet::deleteRow( ) throw(SQLException, RuntimeException, std::
checkCache();
if ( m_bBeforeFirst || m_bAfterLast )
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_DELETE_BEFORE_AFTER ), SQL_INVALID_CURSOR_POSITION, *this );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_DELETE_BEFORE_AFTER ), StandardSQLState::INVALID_CURSOR_POSITION, *this );
if ( m_bNew )
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_DELETE_INSERT_ROW ), SQL_INVALID_CURSOR_POSITION, *this );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_DELETE_INSERT_ROW ), StandardSQLState::INVALID_CURSOR_POSITION, *this );
if ( m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY )
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_RESULT_IS_READONLY ), SQL_FUNCTION_SEQUENCE_ERROR, *this );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_RESULT_IS_READONLY ), StandardSQLState::FUNCTION_SEQUENCE_ERROR, *this );
if ( ( m_pCache->m_nPrivileges & Privilege::DELETE ) != Privilege::DELETE )
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_DELETE_PRIVILEGE ), SQL_FUNCTION_SEQUENCE_ERROR, *this );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_DELETE_PRIVILEGE ), StandardSQLState::FUNCTION_SEQUENCE_ERROR, *this );
if ( rowDeleted() )
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_ROW_ALREADY_DELETED ), SQL_FUNCTION_SEQUENCE_ERROR, *this );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_ROW_ALREADY_DELETED ), StandardSQLState::FUNCTION_SEQUENCE_ERROR, *this );
// this call position the cache indirect
Any aBookmarkToDelete( m_aBookmark );
@@ -1160,7 +1160,7 @@ void SAL_CALL ORowSet::moveToInsertRow( ) throw(SQLException, RuntimeException,
::osl::ResettableMutexGuard aGuard( *m_pMutex );
checkPositioningAllowed();
if ( ( m_pCache->m_nPrivileges & Privilege::INSERT ) != Privilege::INSERT )
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_INSERT_PRIVILEGE ), SQL_GENERAL_ERROR, *this );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_INSERT_PRIVILEGE ), StandardSQLState::GENERAL_ERROR, *this );
if ( notifyAllListenersCursorBeforeMove( aGuard ) )
{
@@ -1258,7 +1258,7 @@ void SAL_CALL ORowSet::moveToCurrentRow( ) throw(SQLException, RuntimeException
// m_bModified should be true. Also, as soon as somebody calls moveToInsertRow,
// our current row should not be deleted anymore. So, we should not have survived the above
// check "if ( !m_pCache->m_bNew && !m_bModified )"
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_ROW_ALREADY_DELETED ), SQL_FUNCTION_SEQUENCE_ERROR, *this );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_ROW_ALREADY_DELETED ), StandardSQLState::FUNCTION_SEQUENCE_ERROR, *this );
if ( notifyAllListenersCursorBeforeMove( aGuard ) )
{
@@ -1631,7 +1631,7 @@ void ORowSet::impl_ensureStatement_throw()
m_xStatement = m_xActiveConnection->prepareStatement( sCommandToExecute );
if ( !m_xStatement.is() )
{
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_INTERNAL_ERROR ), SQL_GENERAL_ERROR, *this );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_INTERNAL_ERROR ), StandardSQLState::GENERAL_ERROR, *this );
}
Reference< XPropertySet > xStatementProps( m_xStatement, UNO_QUERY_THROW );
@@ -2408,7 +2408,7 @@ bool ORowSet::impl_buildActiveCommand_throw()
m_aActiveCommand = sCommand;
if ( m_aActiveCommand.isEmpty() && !bDoEscapeProcessing )
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_SQL_COMMAND ), SQL_FUNCTION_SEQUENCE_ERROR, *this );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_SQL_COMMAND ), StandardSQLState::FUNCTION_SEQUENCE_ERROR, *this );
return bDoEscapeProcessing;
}
@@ -2704,16 +2704,16 @@ void ORowSet::checkUpdateConditions(sal_Int32 columnIndex)
{
checkCache();
if ( m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY)
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_RESULT_IS_READONLY ), SQL_GENERAL_ERROR, *this );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_RESULT_IS_READONLY ), StandardSQLState::GENERAL_ERROR, *this );
if ( rowDeleted() )
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_ROW_ALREADY_DELETED ), SQL_INVALID_CURSOR_POSITION, *this );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_ROW_ALREADY_DELETED ), StandardSQLState::INVALID_CURSOR_POSITION, *this );
if ( m_aCurrentRow.isNull() )
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_INVALID_CURSOR_STATE ), SQL_INVALID_CURSOR_STATE, *this );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_INVALID_CURSOR_STATE ), StandardSQLState::INVALID_CURSOR_STATE, *this );
if ( columnIndex <= 0 || sal_Int32((*m_aCurrentRow)->get().size()) <= columnIndex )
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_INVALID_INDEX ), SQL_INVALID_DESCRIPTOR_INDEX, *this );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_INVALID_INDEX ), StandardSQLState::INVALID_DESCRIPTOR_INDEX, *this );
}
void SAL_CALL ORowSet::refreshRow( ) throw(SQLException, RuntimeException, std::exception)
diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx
index 2ad04adb142c..85d9a713f355 100644
--- a/dbaccess/source/core/api/RowSetBase.cxx
+++ b/dbaccess/source/core/api/RowSetBase.cxx
@@ -207,7 +207,7 @@ const ORowSetValue& ORowSetBase::impl_getValue(sal_Int32 columnIndex)
if ( m_bBeforeFirst || m_bAfterLast )
{
SAL_WARN("dbaccess", "ORowSetBase::getValue: Illegal call here (we're before first or after last)!");
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_CURSOR_BEFORE_OR_AFTER ), SQL_INVALID_CURSOR_POSITION, *m_pMySelf );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_CURSOR_BEFORE_OR_AFTER ), StandardSQLState::INVALID_CURSOR_POSITION, *m_pMySelf );
}
if ( impl_rowDeleted() )
@@ -333,7 +333,7 @@ Reference< css::io::XInputStream > SAL_CALL ORowSetBase::getBinaryStream( sal_In
if ( m_bBeforeFirst || m_bAfterLast )
{
SAL_WARN("dbaccess", "ORowSetBase::getBinaryStream: Illegal call here (we're before first or after last)!");
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_CURSOR_BEFORE_OR_AFTER ), SQL_INVALID_CURSOR_POSITION, *m_pMySelf );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_CURSOR_BEFORE_OR_AFTER ), StandardSQLState::INVALID_CURSOR_POSITION, *m_pMySelf );
}
if ( impl_rowDeleted() )
@@ -403,10 +403,10 @@ Any SAL_CALL ORowSetBase::getBookmark( ) throw(SQLException, RuntimeException,
checkCache();
if ( m_bBeforeFirst || m_bAfterLast )
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_BOOKMARK_BEFORE_OR_AFTER ), SQL_INVALID_CURSOR_POSITION, *m_pMySelf );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_BOOKMARK_BEFORE_OR_AFTER ), StandardSQLState::INVALID_CURSOR_POSITION, *m_pMySelf );
if ( impl_rowDeleted() )
- ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_BOOKMARK_DELETED ), SQL_INVALID_CURSOR_POSITION, *m_pMySelf );
+ ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_BOOKMARK_DELETED ), StandardSQLState::INVALID_CURSOR_POSITION, *m_pMySelf );
OSL_ENSURE( m_aBookmark.hasValue(), "ORowSetBase::getBookmark: bookmark has no value!" );
return m_aBookmark;
@@ -1094,7 +1094,7 @@ void SAL_CALL ORowSetBase::refreshRow( ) throw(SQLException, RuntimeException,
::osl::MutexGuard aGuard( *m_pMutex );
checkCache();
if ( impl_rowDeleted() )
- throwSQLException( "The current row is deleted", SQL_INVALID_CURSOR_STATE, Reference< XRowSet >( this ) );
+ throwSQLException( "The current row is deleted", StandardSQLState::INVALID_CURSOR_STATE, Reference< XRowSet >( this ) );
if(!(m_bBeforeFirst || m_bAfterLast))
{
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 4da4c7068bc1..f97daac96524 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -107,7 +107,7 @@ namespace
const OSQLParseNode* pNewSqlParseNode = _rParser.parseTree( aErrorMsg, _rStatement );
if ( !pNewSqlParseNode )
{
- OUString sSQLStateGeneralError( getStandardSQLState( SQL_GENERAL_ERROR ) );
+ OUString sSQLStateGeneralError( getStandardSQLState( StandardSQLState::GENERAL_ERROR ) );
SQLException aError2( aErrorMsg, _rxContext, sSQLStateGeneralError, 1000, Any() );
SQLException aError1( _rStatement, _rxContext, sSQLStateGeneralError, 1000, makeAny( aError2 ) );
throw SQLException(_rParser.getContext().getErrorMessage(OParseContext::ErrorCode::General),_rxContext,sSQLStateGeneralError,1000,makeAny(aError1));
@@ -134,9 +134,9 @@ namespace
// restore the old node before throwing the exception
_rIterator.setParseTree( pOldNode );
// and now really ...
- SQLException aError1( _rOriginatingCommand, _rxContext, getStandardSQLState( SQL_GENERAL_ERROR ), 1000, Any() );
+ SQLException aError1( _rOriginatingCommand, _rxContext, getStandardSQLState( StandardSQLState::GENERAL_ERROR ), 1000, Any() );
throw SQLException( DBACORE_RESSTRING( RID_STR_ONLY_QUERY ), _rxContext,
- getStandardSQLState( SQL_GENERAL_ERROR ), 1000, makeAny( aError1 ) );
+ getStandardSQLState( StandardSQLState::GENERAL_ERROR ), 1000, makeAny( aError1 ) );
}
delete pOldNode;
diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx
index abe8735ea2fb..dfb7580190ce 100644
--- a/dbaccess/source/core/api/query.cxx
+++ b/dbaccess/source/core/api/query.cxx
@@ -159,7 +159,7 @@ void OQuery::rebuildColumns()
if ( !xResultSetMeta.is() )
{
OUString sError( DBA_RES( RID_STR_STATEMENT_WITHOUT_RESULT_SET ) );
- ::dbtools::throwSQLException( sError, SQL_GENERAL_ERROR, *this );
+ ::dbtools::throwSQLException( sError, StandardSQLState::GENERAL_ERROR, *this );
}
Reference< XDatabaseMetaData > xDBMeta( m_xConnection->getMetaData(), UNO_QUERY_THROW );
diff --git a/dbaccess/source/core/api/resultset.cxx b/dbaccess/source/core/api/resultset.cxx
index f32168acba52..e69cf2bd1d05 100644
--- a/dbaccess/source/core/api/resultset.cxx
+++ b/dbaccess/source/core/api/resultset.cxx
@@ -992,13 +992,13 @@ void OResultSet::checkReadOnly() const
if ( ( m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY )
|| !m_xDelegatorResultSetUpdate.is()
)
- throwSQLException( "The result set is read-only.", SQL_GENERAL_ERROR, *const_cast< OResultSet* >( this ) );
+ throwSQLException( "The result set is read-only.", StandardSQLState::GENERAL_ERROR, *const_cast< OResultSet* >( this ) );
}
void OResultSet::checkBookmarkable() const
{
if ( !m_bIsBookmarkable )
- throwSQLException( "The result set does not have bookmark support.", SQL_GENERAL_ERROR, *const_cast< OResultSet* >( this ) );
+ throwSQLException( "The result set does not have bookmark support.", StandardSQLState::GENERAL_ERROR, *const_cast< OResultSet* >( this ) );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx
index ab8fcda1b419..0fa5f28b9201 100644
--- a/dbaccess/source/ui/querydesign/QueryTableView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx
@@ -949,7 +949,7 @@ bool OQueryTableView::ExistsAVisitedConn(const OQueryTableWindow* pFrom) const
void OQueryTableView::onNoColumns_throw()
{
OUString sError( ModuleRes( STR_STATEMENT_WITHOUT_RESULT_SET ) );
- ::dbtools::throwSQLException( sError, ::dbtools::SQL_GENERAL_ERROR, nullptr );
+ ::dbtools::throwSQLException( sError, ::dbtools::StandardSQLState::GENERAL_ERROR, nullptr );
}
bool OQueryTableView::supressCrossNaturalJoin(const TTableConnectionData::value_type& _pData) const
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index 03f8a4c18535..9e6c9c26535d 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -1201,7 +1201,7 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou
if ( ( nSourceColumn < 1 ) || ( nSourceColumn >= (sal_Int32)aSourceColTypes.size() ) )
{ // ( we have to check here against 1 because the parameters are 1 based)
::dbtools::throwSQLException("Internal error: invalid column type index.",
- ::dbtools::SQL_INVALID_DESCRIPTOR_INDEX, *this);
+ ::dbtools::StandardSQLState::INVALID_DESCRIPTOR_INDEX, *this);
}
switch ( aSourceColTypes[ nSourceColumn ] )
@@ -1285,7 +1285,7 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou
::dbtools::throwSQLException(
aMessage,
- ::dbtools::SQL_INVALID_SQL_DATA_TYPE,
+ ::dbtools::StandardSQLState::INVALID_SQL_DATA_TYPE,
*this
);
}