1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef CONNECTIVITY_STANDARD_SQL_STATE_HXX 25 #define CONNECTIVITY_STANDARD_SQL_STATE_HXX 26 27 //......................................................................... 28 namespace dbtools 29 { 30 //......................................................................... 31 32 //---------------------------------------------------------------------------------- 33 /** standard SQLStates to be used with an SQLException 34 35 Extend this list whenever you need a new state ... 36 37 @see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcodbc_error_codes.asp 38 */ 39 enum StandardSQLState 40 { 41 SQL_WRONG_PARAMETER_NUMBER, // 07001 42 SQL_INVALID_DESCRIPTOR_INDEX, // 07009 43 SQL_UNABLE_TO_CONNECT, // 08001 44 SQL_NUMERIC_OUT_OF_RANGE, // 22003 45 SQL_INVALID_DATE_TIME, // 22007 46 SQL_INVALID_CURSOR_STATE, // 24000 47 SQL_TABLE_OR_VIEW_EXISTS, // 42S01 48 SQL_TABLE_OR_VIEW_NOT_FOUND, // 42S02 49 SQL_INDEX_ESISTS, // 42S11 50 SQL_INDEX_NOT_FOUND, // 42S12 51 SQL_COLUMN_EXISTS, // 42S21 52 SQL_COLUMN_NOT_FOUND, // 42S22 53 SQL_GENERAL_ERROR, // HY000 54 SQL_INVALID_SQL_DATA_TYPE, // HY004 55 SQL_OPERATION_CANCELED, // HY008 56 SQL_FUNCTION_SEQUENCE_ERROR, // HY010 57 SQL_INVALID_CURSOR_POSITION, // HY109 58 SQL_INVALID_BOOKMARK_VALUE, // HY111 59 SQL_FEATURE_NOT_IMPLEMENTED, // HYC00 60 SQL_FUNCTION_NOT_SUPPORTED, // IM001 61 SQL_CONNECTION_DOES_NOT_EXIST, // 08003 62 63 SQL_ERROR_UNSPECIFIED = SAL_MAX_ENUM // special value indicating that an SQLState is not to be specified 64 }; 65 66 //......................................................................... 67 } // namespace dbtools 68 //......................................................................... 69 70 #endif // CONNECTIVITY_STANDARD_SQL_STATE_HXX 71