kexi

error.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2003-2006 Jaroslaw Staniek <js@iidea.pl>
00003    Copyright (C) 2003 Joseph Wenninger <jowenn@kde.org>
00004 
00005    This program is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this program; see the file COPYING.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef _KEXI_ERROR_H_
00022 #define _KEXI_ERROR_H_
00023 
00024 #include <qstring.h>
00025 
00026 #include "kexidb/kexidb_export.h"
00027 
00030 #define ERR_NONE 0
00031 #define ERR_NO_NAME_SPECIFIED 9 
00032 #define ERR_DRIVERMANAGER 10
00033 #define ERR_INVALID_IDENTIFIER 11 
00034 #define ERR_MISSING_DB_LOCATION 20
00035 #define ERR_ALREADY_CONNECTED 30
00036 #define ERR_NO_CONNECTION 40 
00037 #define ERR_CONNECTION_FAILED 41 
00038 #define ERR_CLOSE_FAILED 42 
00039 #define ERR_NO_DB_USED 43 
00040 #define ERR_OBJECT_EXISTS 50
00041 #define ERR_OBJECT_THE_SAME 51
00042 #define ERR_OBJECT_NOT_FOUND 60
00043 #define ERR_ACCESS_RIGHTS 70
00044 #define ERR_TRANSACTION_ACTIVE 80
00045 #define ERR_NO_TRANSACTION_ACTIVE 81
00046 #define ERR_NO_DB_PROPERTY 90 
00047 #define ERR_DB_SPECIFIC 100
00048 #define ERR_CURSOR_NOT_OPEN 110
00049 #define ERR_SINGLE_DB_NAME_MISMATCH 120
00050 #define ERR_CURSOR_RECORD_FETCHING 130 
00051 #define ERR_UNSUPPORTED_DRV_FEATURE 140 
00052 #define ERR_ROLLBACK_OR_COMMIT_TRANSACTION 150 
00053 #define ERR_SYSTEM_NAME_RESERVED 160 
00054 
00055 #define ERR_CANNOT_CREATE_EMPTY_OBJECT 170 
00056 
00057 #define ERR_INVALID_DRIVER_IMPL 180 
00058 #define ERR_INCOMPAT_DRIVER_VERSION 181 
00059 #define ERR_INCOMPAT_DATABASE_VERSION 182 
00060 
00061 #define ERR_INVALID_DATABASE_CONTENTS 183 
00062 
00063 
00065 #define ERR_UPDATE_NULL_PKEY_FIELD 190 
00066 #define ERR_UPDATE_SERVER_ERROR 191    
00067 #define ERR_UPDATE_NO_MASTER_TABLE 192 
00068 
00069 #define ERR_UPDATE_NO_MASTER_TABLES_PKEY 193 
00070 
00071 
00072 #define ERR_UPDATE_NO_ENTIRE_MASTER_TABLES_PKEY 194 
00073 
00074 
00075 
00077 #define ERR_INSERT_NULL_PKEY_FIELD 220 
00078 #define ERR_INSERT_SERVER_ERROR 221    
00079 #define ERR_INSERT_NO_MASTER_TABLE 222 
00080 
00081 #define ERR_INSERT_NO_MASTER_TABLES_PKEY 223 
00082 
00083 #define ERR_INSERT_NO_ENTIRE_MASTER_TABLES_PKEY 224 
00084 
00085 
00086 
00088 #define ERR_DELETE_NULL_PKEY_FIELD 250 
00089 #define ERR_DELETE_SERVER_ERROR 251    
00090 #define ERR_DELETE_NO_MASTER_TABLE 252 
00091 
00092 #define ERR_DELETE_NO_MASTER_TABLES_PKEY 253 
00093 
00094 #define ERR_DELETE_NO_ENTIRE_MASTER_TABLES_PKEY 254 
00095 
00096 
00097 
00099 #define ERR_SQL_EXECUTION_ERROR 260 
00100 
00101 #define ERR_SQL_PARSE_ERROR 270 
00102 
00103 #define ERR_OTHER 0xffff 
00104 
00105 
00106 namespace KexiDB {
00107 
00110 class KEXI_DB_EXPORT ResultInfo
00111 {
00112     public:
00113         ResultInfo()
00114         {
00115             success = true;
00116             allowToDiscardChanges = false;
00117             column = -1;
00118         }
00120         void clear() {
00121             success = true;
00122             allowToDiscardChanges = false;
00123             column = -1;
00124             msg = QString::null;
00125             desc = QString::null;
00126         }
00127     bool success : 1; 
00128     bool allowToDiscardChanges : 1; 
00129 
00130 
00131     QString msg, desc; 
00132     int column; 
00133 };
00134 
00135 }//namespace
00136 
00137 #endif
00138 
KDE Home | KDE Accessibility Home | Description of Access Keys