summaryrefslogtreecommitdiff
path: root/include/connectivity
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 /include/connectivity
parent960d4ebf76d3e7c757d2625a1e52a22556da9d40 (diff)
convert StandardSQLState to scoped enum
Change-Id: Ia0a1526140cfed35a73a6fea1a173d2fb5005960
Diffstat (limited to 'include/connectivity')
-rw-r--r--include/connectivity/dbtools.hxx2
-rw-r--r--include/connectivity/standardsqlstate.hxx46
2 files changed, 24 insertions, 24 deletions
diff --git a/include/connectivity/dbtools.hxx b/include/connectivity/dbtools.hxx
index 78b61cd5a009..515a4dc400b1 100644
--- a/include/connectivity/dbtools.hxx
+++ b/include/connectivity/dbtools.hxx
@@ -306,7 +306,7 @@ namespace dbtools
const css::sdbc::SQLException& _rChainedException,
const css::uno::Reference< css::uno::XInterface >& _rxContext,
const OUString& _rAdditionalError,
- const StandardSQLState _eSQLState = SQL_ERROR_UNSPECIFIED,
+ const StandardSQLState _eSQLState = StandardSQLState::ERROR_UNSPECIFIED,
const sal_Int32 _nErrorCode = 0);
/** search the parent hierarchy for a data source.
diff --git a/include/connectivity/standardsqlstate.hxx b/include/connectivity/standardsqlstate.hxx
index 0d3971fc5329..9af461ddf400 100644
--- a/include/connectivity/standardsqlstate.hxx
+++ b/include/connectivity/standardsqlstate.hxx
@@ -31,31 +31,31 @@ namespace dbtools
@see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcodbc_error_codes.asp
*/
- enum StandardSQLState
+ enum class StandardSQLState
{
- SQL_WRONG_PARAMETER_NUMBER, // 07001
- SQL_INVALID_DESCRIPTOR_INDEX, // 07009
- SQL_UNABLE_TO_CONNECT, // 08001
- SQL_NUMERIC_OUT_OF_RANGE, // 22003
- SQL_INVALID_DATE_TIME, // 22007
- SQL_INVALID_CURSOR_STATE, // 24000
- SQL_TABLE_OR_VIEW_EXISTS, // 42S01
- SQL_TABLE_OR_VIEW_NOT_FOUND, // 42S02
- SQL_INDEX_ESISTS, // 42S11
- SQL_INDEX_NOT_FOUND, // 42S12
- SQL_COLUMN_EXISTS, // 42S21
- SQL_COLUMN_NOT_FOUND, // 42S22
- SQL_GENERAL_ERROR, // HY000
- SQL_INVALID_SQL_DATA_TYPE, // HY004
- SQL_OPERATION_CANCELED, // HY008
- SQL_FUNCTION_SEQUENCE_ERROR, // HY010
- SQL_INVALID_CURSOR_POSITION, // HY109
- SQL_INVALID_BOOKMARK_VALUE, // HY111
- SQL_FEATURE_NOT_IMPLEMENTED, // HYC00
- SQL_FUNCTION_NOT_SUPPORTED, // IM001
- SQL_CONNECTION_DOES_NOT_EXIST, // 08003
+ WRONG_PARAMETER_NUMBER, // 07001
+ INVALID_DESCRIPTOR_INDEX, // 07009
+ UNABLE_TO_CONNECT, // 08001
+ NUMERIC_OUT_OF_RANGE, // 22003
+ INVALID_DATE_TIME, // 22007
+ INVALID_CURSOR_STATE, // 24000
+ TABLE_OR_VIEW_EXISTS, // 42S01
+ TABLE_OR_VIEW_NOT_FOUND, // 42S02
+ INDEX_ESISTS, // 42S11
+ INDEX_NOT_FOUND, // 42S12
+ COLUMN_EXISTS, // 42S21
+ COLUMN_NOT_FOUND, // 42S22
+ GENERAL_ERROR, // HY000
+ INVALID_SQL_DATA_TYPE, // HY004
+ OPERATION_CANCELED, // HY008
+ FUNCTION_SEQUENCE_ERROR, // HY010
+ INVALID_CURSOR_POSITION, // HY109
+ INVALID_BOOKMARK_VALUE, // HY111
+ FEATURE_NOT_IMPLEMENTED, // HYC00
+ FUNCTION_NOT_SUPPORTED, // IM001
+ CONNECTION_DOES_NOT_EXIST, // 08003
- SQL_ERROR_UNSPECIFIED = SAL_MAX_ENUM // special value indicating that an SQLState is not to be specified
+ ERROR_UNSPECIFIED = SAL_MAX_ENUM // special value indicating that an SQLState is not to be specified
};