kexi

error.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2003-2005 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_NO_DB_USED 41 
00039 #define ERR_OBJECT_EXISTS 50
00040 #define ERR_OBJECT_THE_SAME 51
00041 #define ERR_OBJECT_NOT_FOUND 60
00042 #define ERR_ACCESS_RIGHTS 70
00043 #define ERR_TRANSACTION_ACTIVE 80
00044 #define ERR_NO_TRANSACTION_ACTIVE 81
00045 #define ERR_NO_DB_PROPERTY 90 
00046 #define ERR_DB_SPECIFIC 100
00047 #define ERR_CURSOR_NOT_OPEN 110
00048 #define ERR_SINGLE_DB_NAME_MISMATCH 120
00049 #define ERR_CURSOR_RECORD_FETCHING 130 
00050 #define ERR_UNSUPPORTED_DRV_FEATURE 140 
00051 #define ERR_ROLLBACK_OR_COMMIT_TRANSACTION 150 
00052 #define ERR_SYSTEM_NAME_RESERVED 160 
00053 
00054 #define ERR_CANNOT_CREATE_EMPTY_OBJECT 170 
00055 
00056 #define ERR_INVALID_DRIVER_IMPL 180 
00057 #define ERR_INCOMPAT_DRIVER_VERSION 181 
00058 #define ERR_INCOMPAT_DATABASE_VERSION 182 
00059 
00060 #define ERR_INVALID_DATABASE_CONTENTS 183 
00061 
00062 
00063 
00064 #define ERR_UPDATE_NULL_PKEY_FIELD 190 
00065 #define ERR_UPDATE_SERVER_ERROR 191    
00066 #define ERR_UPDATE_NO_MASTER_TABLE 192 
00067 
00068 #define ERR_UPDATE_NO_MASTER_TABLES_PKEY 193 
00069 
00070 
00071 #define ERR_UPDATE_NO_ENTIRE_MASTER_TABLES_PKEY 194 
00072 
00073 
00074 
00075 
00076 #define ERR_INSERT_NULL_PKEY_FIELD 220 
00077 #define ERR_INSERT_SERVER_ERROR 221    
00078 #define ERR_INSERT_NO_MASTER_TABLE 222 
00079 
00080 #define ERR_INSERT_NO_MASTER_TABLES_PKEY 223 
00081 
00082 #define ERR_INSERT_NO_ENTIRE_MASTER_TABLES_PKEY 224 
00083 
00084 
00085 
00086 
00087 #define ERR_DELETE_NULL_PKEY_FIELD 250 
00088 #define ERR_DELETE_SERVER_ERROR 251    
00089 #define ERR_DELETE_NO_MASTER_TABLE 252 
00090 
00091 #define ERR_DELETE_NO_MASTER_TABLES_PKEY 253 
00092 
00093 #define ERR_DELETE_NO_ENTIRE_MASTER_TABLES_PKEY 254 
00094 
00095 
00096 
00097 
00098 #define ERR_SQL_EXECUTION_ERROR 260 
00099 
00100 #define ERR_SQL_PARSE_ERROR 270 
00101 
00102 #define ERR_OTHER 0xffff 
00103 
00104 
00105 namespace KexiDB {
00106 
00109 class KEXI_DB_EXPORT ResultInfo
00110 {
00111     public:
00112         ResultInfo()
00113         {
00114             success = true;
00115             column = -1;
00116         }
00118         void clear() {
00119             success = true;
00120             column = -1;
00121             msg = QString::null;
00122             desc = QString::null;
00123         }
00124     bool success; 
00125     QString msg, desc; 
00126     int column; 
00127 };
00128 
00129 }//namespace
00130 
00131 #endif
00132 
KDE Home | KDE Accessibility Home | Description of Access Keys