Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

TState.java

00001 /*
00002 *  Name:      TState.java
00003 *  Author:    Rafael Jesus Alcantara Perez
00004 *  Summary:   State data
00005 *  Date:      $Date: 2003/06/28 14:47:51 $
00006 *  Revision:  $Revision: 1.3 $
00007 *
00008 *  Copyright (C) 2002  Rafael Jesus Alcantara Perez <rafa@dedalo-ing.com>
00009 *
00010 *  This program is free software; you can redistribute it and/or modify
00011 *  it under the terms of the GNU General Public License as published by
00012 *  the Free Software Foundation; either version 2 of the License, or
00013 *  (at your option) any later version.
00014 *
00015 *  This program is distributed in the hope that it will be useful,
00016 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 *  GNU General Public License for more details.
00019 *
00020 *  You should have received a copy of the GNU General Public License
00021 *  along with this program; if not, write to the Free Software
00022 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00023 *  MA 02111-1307, USA.
00024 */
00025 
00027 package org.uesqlc;
00028 
00029 import java.util.Hashtable;
00030 import java.util.Map;
00031 
00032 
00034 public class TState
00035 {
00036 
00041   public static int   SQLCODE = 0;
00042 
00047   public static String   SQLMESSAGE = "";
00048 
00050   public static String   SQLSTATE = "00000";
00051 
00056   private static Hashtable   _tSqlstateToIntMap = new Hashtable();
00057 
00058   //
00059   //  SQLSTATE class and subclass values.
00060   //    Classes has been represented as a Java class, and subclasses have
00061   //    been represented as strings.
00062   //
00063 
00065   public static class ambiguous_cursor_name
00066   {
00067     public static final String   _kyNO_SUBCLASS = "3C000";
00068     public static final int      _kiNO_SUBCLASS = 0;
00069   }
00070 
00072   public static class cardinality_violation
00073   {
00074     public static final String   _kyNO_SUBCLASS = "21000";
00075     public static final int      _kiNO_SUBCLASS = 1000;
00076   }
00077   
00079   public static class connection_exception
00080   {
00081     public static final String   _kyNO_SUBCLASS                                       = "08000";
00082     public static final String   _kyCONNECTION_DOES_NOT_EXIST                         = "08003";
00083     public static final String   _kyCONNECTION_FAILURE                                = "08006";
00084     public static final String   _kyCONNECTION_NAME_IN_USE                            = "08002";
00085     public static final String   _kySQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION       = "08001";
00086     public static final String   _kySQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION = "08004";
00087     public static final String   _kyTRANSACTION_RESOLUTION_UNKNOWN                    = "08007";
00088     public static final int      _kiNO_SUBCLASS                                       = 2000;
00089     public static final int      _kiCONNECTION_DOES_NOT_EXIST                         = 2001;
00090     public static final int      _kiCONNECTION_FAILURE                                = 2002;
00091     public static final int      _kiCONNECTION_NAME_IN_USE                            = 2003;
00092     public static final int      _kiSQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION       = 2004;
00093     public static final int      _kiSQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION = 2005;
00094     public static final int      _kiTRANSACTION_RESOLUTION_UNKNOWN                    = 2006;
00095   }
00096   
00098   public static class data_exception
00099   {
00100     public static final String   _kyNO_SUBCLASS                          = "22000";
00101     public static final String   _kyCHARACTER_NOT_IN_REPERTOIRE          = "22021";
00102     public static final String   _kyDATETIME_FIELD_OVERFLOW              = "22008";
00103     public static final String   _kyDIVISION_BY_ZERO                     = "22012";
00104     public static final String   _kyERROR_IN_ASSIGNMENT                  = "22005";
00105     public static final String   _kyINDICATOR_OVERFLOW                   = "22022";
00106     public static final String   _kyINTERVAL_FIELD_OVERFLOW              = "22015";
00107     public static final String   _kyINVALID_CHARACTER_VALUE_FOR_CAST     = "22018";
00108     public static final String   _kyINVALID_DATETIME_FORMAT              = "22007";
00109     public static final String   _kyINVALID_ESCAPE_CHARACTER             = "22019";
00110     public static final String   _kyINVALID_ESCAPE_SEQUENCE              = "22025";
00111     public static final String   _kyINVALID_PARAMETER_VALUE              = "22023";
00112     public static final String   _kyINVALID_TIME_ZONE_DISPLACEMENT_VALUE = "22009";
00113     public static final String   _kyNULL_VALUE_NO_INDICATOR_PARAMETER    = "22002";
00114     public static final String   _kyNUMERIC_VALUE_OUT_OF_RANGE           = "22003";
00115     public static final String   _kySTRING_DATA_LENGTH_MISMATCH          = "22026";
00116     public static final String   _kySTRING_DATA_RIGHT_TRUNCATION         = "22001";
00117     public static final String   _kySUBSTRING_ERROR                      = "22011";
00118     public static final String   _kyTRIM_ERROR                           = "22027";
00119     public static final String   _kyUNTERMINATED_C_STRING                = "22024";
00120     public static final int      _kiNO_SUBCLASS                          = 3000;
00121     public static final int      _kiCHARACTER_NOT_IN_REPERTOIRE          = 3001;
00122     public static final int      _kiDATETIME_FIELD_OVERFLOW              = 3002;
00123     public static final int      _kiDIVISION_BY_ZERO                     = 3003;
00124     public static final int      _kiERROR_IN_ASSIGNMENT                  = 3004;
00125     public static final int      _kiINDICATOR_OVERFLOW                   = 3005;
00126     public static final int      _kiINTERVAL_FIELD_OVERFLOW              = 3006;
00127     public static final int      _kiINVALID_CHARACTER_VALUE_FOR_CAST     = 3007;
00128     public static final int      _kiINVALID_DATETIME_FORMAT              = 3008;
00129     public static final int      _kiINVALID_ESCAPE_CHARACTER             = 3009;
00130     public static final int      _kiINVALID_ESCAPE_SEQUENCE              = 3010;
00131     public static final int      _kiINVALID_PARAMETER_VALUE              = 3011;
00132     public static final int      _kiINVALID_TIME_ZONE_DISPLACEMENT_VALUE = 3012;
00133     public static final int      _kiNULL_VALUE_NO_INDICATOR_PARAMETER    = 3013;
00134     public static final int      _kiNUMERIC_VALUE_OUT_OF_RANGE           = 3014;
00135     public static final int      _kiSTRING_DATA_LENGTH_MISMATCH          = 3015;
00136     public static final int      _kiSTRING_DATA_RIGHT_TRUNCATION         = 3016;
00137     public static final int      _kiSUBSTRING_ERROR                      = 3017;
00138     public static final int      _kiTRIM_ERROR                           = 3018;
00139     public static final int      _kiUNTERMINATED_C_STRING                = 3019;
00140   }
00141   
00143   public static class dependent_privilege_descriptors_still_exist
00144   {
00145     public static final String   _kyNO_SUBCLASS = "2B000";
00146     public static final int      _kiNO_SUBCLASS = 4000;
00147   }
00148   
00150   public static class dynamic_sql_error
00151   {
00152     public static final String   _kyNO_SUBCLASS                                        = "07000";
00153     public static final String   _kyCURSOR_SPECIFICATION_CANNOT_BE_EXECUTED            = "07003";
00154     public static final String   _kyINVALID_DESCRIPTOR_COUNT                           = "07008";
00155     public static final String   _kyINVALID_DESCRIPTOR_INDEX                           = "07009";
00156     public static final String   _kyPREPARED_STATEMENT_NOT_A_CURSOR_SPECIFICATION      = "07005";
00157     public static final String   _kyRESTRICTED_DATA_TYPE_ATTRIBUTE_VIOLATION           = "07006";
00158     public static final String   _kyUSING_CLAUSE_DOES_NOT_MATCH_DYNAMIC_PARAMETER_SPEC = "07001";
00159     public static final String   _kyUSING_CLAUSE_DOES_NOT_MATCH_TARGET_SPEC            = "07002";
00160     public static final String   _kyUSING_CLAUSE_REQUIRED_FOR_DYNAMIC_PARAMETERS       = "07004";
00161     public static final String   _kyUSING_CLAUSE_REQUIRED_FOR_RESULT_FIELDS            = "07007";
00162     public static final int      _kiNO_SUBCLASS                                        = 5000;
00163     public static final int      _kiCURSOR_SPECIFICATION_CANNOT_BE_EXECUTED            = 5001;
00164     public static final int      _kiINVALID_DESCRIPTOR_COUNT                           = 5002;
00165     public static final int      _kiINVALID_DESCRIPTOR_INDEX                           = 5003;
00166     public static final int      _kiPREPARED_STATEMENT_NOT_A_CURSOR_SPECIFICATION      = 5004;
00167     public static final int      _kiRESTRICTED_DATA_TYPE_ATTRIBUTE_VIOLATION           = 5005;
00168     public static final int      _kiUSING_CLAUSE_DOES_NOT_MATCH_DYNAMIC_PARAMETER_SPEC = 5006;
00169     public static final int      _kiUSING_CLAUSE_DOES_NOT_MATCH_TARGET_SPEC            = 5007;
00170     public static final int      _kiUSING_CLAUSE_REQUIRED_FOR_DYNAMIC_PARAMETERS       = 5008;
00171     public static final int      _kiUSING_CLAUSE_REQUIRED_FOR_RESULT_FIELDS            = 5009;
00172   }
00173   
00175   public static class feature_not_supported
00176   {
00177     public static final String   _kyNO_SUBCLASS                       = "0A000";
00178     public static final String   _kyMULTIPLE_ENVIRONMENT_TRANSACTIONS = "0A001";
00179     public static final int      _kiNO_SUBCLASS                       = 6000;
00180     public static final int      _kiMULTIPLE_ENVIRONMENT_TRANSACTIONS = 6001;
00181   }
00182   
00184   public static class integrity_constraint_violation
00185   {
00186     public static final String   _kyNO_SUBCLASS = "23000";
00187     public static final int      _kiNO_SUBCLASS = 7000;
00188   }
00189   
00191   public static class invalid_authorization_specification
00192   {
00193     public static final String   _kyNO_SUBCLASS = "28000";
00194     public static final int      _kiNO_SUBCLASS = 8000;
00195   }
00196   
00198   public static class invalid_catalog_name
00199   {
00200     public static final String   _kyNO_SUBCLASS = "3D000";
00201     public static final int      _kiNO_SUBCLASS = 9000;
00202   }
00203   
00205   public static class invalid_character_set_name
00206   {
00207     public static final String   _kyNO_SUBCLASS = "2C000";
00208     public static final int      _kiNO_SUBCLASS = 10000;
00209   }
00210   
00212   public static class invalid_condition_number
00213   {
00214     public static final String   _kyNO_SUBCLASS = "35000";
00215     public static final int      _kiNO_SUBCLASS = 11000;
00216   }
00217   
00219   public static class invalid_connection_name
00220   {
00221     public static final String   _kyNO_SUBCLASS = "2E000";
00222     public static final int      _kiNO_SUBCLASS = 12000;
00223   }
00224   
00226   public static class invalid_cursor_name
00227   {
00228     public static final String   _kyNO_SUBCLASS = "34000";
00229     public static final int      _kiNO_SUBCLASS = 13000;
00230   }
00231   
00233   public static class invalid_cursor_state
00234   {
00235     public static final String   _kyNO_SUBCLASS = "24000";
00236     public static final int      _kiNO_SUBCLASS = 14000;
00237   }
00238   
00240   public static class invalid_schema_name
00241   {
00242     public static final String   _kyNO_SUBCLASS = "3F000";
00243     public static final int      _kiNO_SUBCLASS = 15000;
00244   }
00245   
00247   public static class invalid_sql_descriptor_name
00248   {
00249     public static final String   _kyNO_SUBCLASS = "33000";
00250     public static final int      _kiNO_SUBCLASS = 16000;
00251   }
00252   
00254   public static class invalid_sql_statement_name
00255   {
00256     public static final String   _kyNO_SUBCLASS = "26000";
00257     public static final int      _kiNO_SUBCLASS = 17000;
00258   }
00259   
00261   public static class invalid_transaction_state
00262   {
00263     public static final String   _kyNO_SUBCLASS = "25000";
00264     public static final int      _kiNO_SUBCLASS = 18000;
00265   }
00266   
00268   public static class invalid_transaction_termination
00269   {
00270     public static final String   _kyNO_SUBCLASS = "2D000";
00271     public static final int      _kiNO_SUBCLASS = 19000;
00272   }
00273   
00275   public static class no_data
00276   {
00277     public static final String   _kyNO_SUBCLASS = "02000";
00278     public static final int      _kiNO_SUBCLASS = 20000;
00279   }
00280   
00282   public static class remote_database_access
00283   {
00284     public static final String   _kyNO_SUBCLASS = "HZ000";
00285     public static final int      _kiNO_SUBCLASS = 21000;
00286   }
00287   
00289   public static class successful_completion
00290   {
00291     public static final String   _kyNO_SUBCLASS = "00000";
00292     public static final int      _kiNO_SUBCLASS = 22000;
00293   }
00294   
00296   public static class syntax_error_or_access_rule_violation
00297   {
00298     public static final String   _kyNO_SUBCLASS = "42000";
00299     public static final int      _kiNO_SUBCLASS = 23000;
00300   }
00301   
00303   public static class syntax_error_or_access_rule_violation_in_direct_statement
00304   {
00305     public static final String   _kyNO_SUBCLASS = "2A000";
00306     public static final int      _kiNO_SUBCLASS = 24000;
00307   }
00308   
00310   public static class syntax_error_or_access_rule_violation_in_dynamic_statement
00311   {
00312     public static final String   _kyNO_SUBCLASS = "37000";
00313     public static final int      _kiNO_SUBCLASS = 25000;
00314   }
00315   
00317   public static class transaction_rollback
00318   {
00319     public static final String   _kyNO_SUBCLASS                    = "40000";
00320     public static final String   _kyINTEGRITY_CONSTRAINT_VIOLATION = "40002";
00321     public static final String   _kySERIALIZATION_FAILURE          = "40001";
00322     public static final String   _kySTATEMENT_COMPLETION_UNKNOWN   = "40003";
00323     public static final int      _kiNO_SUBCLASS                    = 26000;
00324     public static final int      _kiINTEGRITY_CONSTRAINT_VIOLATION = 26001;
00325     public static final int      _kiSERIALIZATION_FAILURE          = 26002;
00326     public static final int      _kiSTATEMENT_COMPLETION_UNKNOWN   = 26003;
00327   }
00328   
00330   public static class triggered_data_change_violation
00331   {
00332     public static final String   _kyNO_SUBCLASS = "27000";
00333     public static final int      _kiNO_SUBCLASS = 27000;
00334   }
00335   
00337   public static class warning
00338   {
00339     public static final String   _kyNO_SUBCLASS                                      = "01000";
00340     public static final String   _kyCURSOR_OPERATION_CONFLICT                        = "01001";
00341     public static final String   _kyDISCONNECT_ERROR                                 = "01002";
00342     public static final String   _kyIMPLICIT_ZERO_BIT_PADDING                        = "01008";
00343     public static final String   _kyINSUFFICIENT_ITEM_DESCRIPTOR_AREAS               = "01005";
00344     public static final String   _kyNULL_VALUE_ELIMINATED_IN_SET_FUNCTION            = "01003";
00345     public static final String   _kyPRIVILEGE_NOT_GRANTED                            = "01007";
00346     public static final String   _kyPRIVILEGE_NOT_REVOKED                            = "01006";
00347     public static final String   _kyQUERY_EXPRESSION_TOO_LONG_FOR_INFORMATION_SCHEMA = "0100A";
00348     public static final String   _kySEARCH_CONDITION_TOO_LONG_FOR_INFORMATION_SCHEMA = "01009";
00349     public static final String   _kySTRING_DATA_RIGHT_TRUNCATION                     = "01004";
00350     public static final int      _kiNO_SUBCLASS                                      = 28000;
00351     public static final int      _kiCURSOR_OPERATION_CONFLICT                        = 28001;
00352     public static final int      _kiDISCONNECT_ERROR                                 = 28002;
00353     public static final int      _kiIMPLICIT_ZERO_BIT_PADDING                        = 28003;
00354     public static final int      _kiINSUFFICIENT_ITEM_DESCRIPTOR_AREAS               = 28004;
00355     public static final int      _kiNULL_VALUE_ELIMINATED_IN_SET_FUNCTION            = 28005;
00356     public static final int      _kiPRIVILEGE_NOT_GRANTED                            = 28006;
00357     public static final int      _kiPRIVILEGE_NOT_REVOKED                            = 28007;
00358     public static final int      _kiQUERY_EXPRESSION_TOO_LONG_FOR_INFORMATION_SCHEMA = 28008;
00359     public static final int      _kiSEARCH_CONDITION_TOO_LONG_FOR_INFORMATION_SCHEMA = 28009;
00360     public static final int      _kiSTRING_DATA_RIGHT_TRUNCATION                     = 28010;
00361   }
00362   
00364   public static class with_check_option_violation
00365   {
00366     public static final String   _kyNO_SUBCLASS = "44000";
00367     public static final int      _kiNO_SUBCLASS = 29000;
00368   }
00369   
00371   private static Map _getSqlstateToIntMap()
00372   {
00373 
00374     if ( _tSqlstateToIntMap.isEmpty() )
00375     {
00376       _tSqlstateToIntMap.put (ambiguous_cursor_name._kyNO_SUBCLASS,                                      new Integer (ambiguous_cursor_name._kiNO_SUBCLASS));
00377       _tSqlstateToIntMap.put (cardinality_violation._kyNO_SUBCLASS,                                      new Integer (cardinality_violation._kiNO_SUBCLASS));
00378       _tSqlstateToIntMap.put (connection_exception._kyNO_SUBCLASS,                                       new Integer (connection_exception._kiNO_SUBCLASS));
00379       _tSqlstateToIntMap.put (connection_exception._kyCONNECTION_DOES_NOT_EXIST,                         new Integer (connection_exception._kiCONNECTION_DOES_NOT_EXIST));
00380       _tSqlstateToIntMap.put (connection_exception._kyCONNECTION_FAILURE,                                new Integer (connection_exception._kiCONNECTION_FAILURE));
00381       _tSqlstateToIntMap.put (connection_exception._kyCONNECTION_NAME_IN_USE,                            new Integer (connection_exception._kiCONNECTION_NAME_IN_USE));
00382       _tSqlstateToIntMap.put (connection_exception._kySQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION,       new Integer (connection_exception._kiSQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION));
00383       _tSqlstateToIntMap.put (connection_exception._kySQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION, new Integer (connection_exception._kiSQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION));
00384       _tSqlstateToIntMap.put (connection_exception._kyTRANSACTION_RESOLUTION_UNKNOWN,                    new Integer (connection_exception._kiTRANSACTION_RESOLUTION_UNKNOWN));
00385       _tSqlstateToIntMap.put (data_exception._kyNO_SUBCLASS,                                             new Integer (data_exception._kiNO_SUBCLASS));
00386       _tSqlstateToIntMap.put (data_exception._kyCHARACTER_NOT_IN_REPERTOIRE,                             new Integer (data_exception._kiCHARACTER_NOT_IN_REPERTOIRE));
00387       _tSqlstateToIntMap.put (data_exception._kyDATETIME_FIELD_OVERFLOW,                                 new Integer (data_exception._kiDATETIME_FIELD_OVERFLOW));
00388       _tSqlstateToIntMap.put (data_exception._kyDIVISION_BY_ZERO,                                        new Integer (data_exception._kiDIVISION_BY_ZERO));
00389       _tSqlstateToIntMap.put (data_exception._kyERROR_IN_ASSIGNMENT,                                     new Integer (data_exception._kiERROR_IN_ASSIGNMENT));
00390       _tSqlstateToIntMap.put (data_exception._kyINDICATOR_OVERFLOW,                                      new Integer (data_exception._kiINDICATOR_OVERFLOW));
00391       _tSqlstateToIntMap.put (data_exception._kyINTERVAL_FIELD_OVERFLOW,                                 new Integer (data_exception._kiINTERVAL_FIELD_OVERFLOW));
00392       _tSqlstateToIntMap.put (data_exception._kyINVALID_CHARACTER_VALUE_FOR_CAST,                        new Integer (data_exception._kiINVALID_CHARACTER_VALUE_FOR_CAST));
00393       _tSqlstateToIntMap.put (data_exception._kyINVALID_DATETIME_FORMAT,                                 new Integer (data_exception._kiINVALID_DATETIME_FORMAT));
00394       _tSqlstateToIntMap.put (data_exception._kyINVALID_ESCAPE_CHARACTER,                                new Integer (data_exception._kiINVALID_ESCAPE_CHARACTER));
00395       _tSqlstateToIntMap.put (data_exception._kyINVALID_ESCAPE_SEQUENCE,                                 new Integer (data_exception._kiINVALID_ESCAPE_SEQUENCE));
00396       _tSqlstateToIntMap.put (data_exception._kyINVALID_PARAMETER_VALUE,                                 new Integer (data_exception._kiINVALID_PARAMETER_VALUE));
00397       _tSqlstateToIntMap.put (data_exception._kyINVALID_TIME_ZONE_DISPLACEMENT_VALUE,                    new Integer (data_exception._kiINVALID_TIME_ZONE_DISPLACEMENT_VALUE));
00398       _tSqlstateToIntMap.put (data_exception._kyNULL_VALUE_NO_INDICATOR_PARAMETER,                       new Integer (data_exception._kiNULL_VALUE_NO_INDICATOR_PARAMETER));
00399       _tSqlstateToIntMap.put (data_exception._kyNUMERIC_VALUE_OUT_OF_RANGE,                              new Integer (data_exception._kiNUMERIC_VALUE_OUT_OF_RANGE));
00400       _tSqlstateToIntMap.put (data_exception._kySTRING_DATA_LENGTH_MISMATCH,                             new Integer (data_exception._kiSTRING_DATA_LENGTH_MISMATCH));
00401       _tSqlstateToIntMap.put (data_exception._kySTRING_DATA_RIGHT_TRUNCATION,                            new Integer (data_exception._kiSTRING_DATA_RIGHT_TRUNCATION));
00402       _tSqlstateToIntMap.put (data_exception._kySUBSTRING_ERROR,                                         new Integer (data_exception._kiSUBSTRING_ERROR));
00403       _tSqlstateToIntMap.put (data_exception._kyTRIM_ERROR,                                              new Integer (data_exception._kiTRIM_ERROR));
00404       _tSqlstateToIntMap.put (data_exception._kyUNTERMINATED_C_STRING,                                   new Integer (data_exception._kiUNTERMINATED_C_STRING));
00405       _tSqlstateToIntMap.put (dependent_privilege_descriptors_still_exist._kyNO_SUBCLASS,                new Integer (dependent_privilege_descriptors_still_exist._kiNO_SUBCLASS));
00406       _tSqlstateToIntMap.put (dynamic_sql_error._kyNO_SUBCLASS,                                          new Integer (dynamic_sql_error._kiNO_SUBCLASS));
00407       _tSqlstateToIntMap.put (dynamic_sql_error._kyCURSOR_SPECIFICATION_CANNOT_BE_EXECUTED,              new Integer (dynamic_sql_error._kiCURSOR_SPECIFICATION_CANNOT_BE_EXECUTED));
00408       _tSqlstateToIntMap.put (dynamic_sql_error._kyINVALID_DESCRIPTOR_COUNT,                             new Integer (dynamic_sql_error._kiINVALID_DESCRIPTOR_COUNT));
00409       _tSqlstateToIntMap.put (dynamic_sql_error._kyINVALID_DESCRIPTOR_INDEX,                             new Integer (dynamic_sql_error._kiINVALID_DESCRIPTOR_INDEX));
00410       _tSqlstateToIntMap.put (dynamic_sql_error._kyPREPARED_STATEMENT_NOT_A_CURSOR_SPECIFICATION,        new Integer (dynamic_sql_error._kiPREPARED_STATEMENT_NOT_A_CURSOR_SPECIFICATION));
00411       _tSqlstateToIntMap.put (dynamic_sql_error._kyRESTRICTED_DATA_TYPE_ATTRIBUTE_VIOLATION,             new Integer (dynamic_sql_error._kiRESTRICTED_DATA_TYPE_ATTRIBUTE_VIOLATION));
00412       _tSqlstateToIntMap.put (dynamic_sql_error._kyUSING_CLAUSE_DOES_NOT_MATCH_DYNAMIC_PARAMETER_SPEC,   new Integer (dynamic_sql_error._kiUSING_CLAUSE_DOES_NOT_MATCH_DYNAMIC_PARAMETER_SPEC));
00413       _tSqlstateToIntMap.put (dynamic_sql_error._kyUSING_CLAUSE_DOES_NOT_MATCH_TARGET_SPEC,              new Integer (dynamic_sql_error._kiUSING_CLAUSE_DOES_NOT_MATCH_TARGET_SPEC));
00414       _tSqlstateToIntMap.put (dynamic_sql_error._kyUSING_CLAUSE_REQUIRED_FOR_DYNAMIC_PARAMETERS,         new Integer (dynamic_sql_error._kiUSING_CLAUSE_REQUIRED_FOR_DYNAMIC_PARAMETERS));
00415       _tSqlstateToIntMap.put (dynamic_sql_error._kyUSING_CLAUSE_REQUIRED_FOR_RESULT_FIELDS,              new Integer (dynamic_sql_error._kiUSING_CLAUSE_REQUIRED_FOR_RESULT_FIELDS));
00416       _tSqlstateToIntMap.put (feature_not_supported._kyNO_SUBCLASS,                                      new Integer (feature_not_supported._kiNO_SUBCLASS));
00417       _tSqlstateToIntMap.put (feature_not_supported._kyMULTIPLE_ENVIRONMENT_TRANSACTIONS,                new Integer (feature_not_supported._kiMULTIPLE_ENVIRONMENT_TRANSACTIONS));
00418       _tSqlstateToIntMap.put (integrity_constraint_violation._kyNO_SUBCLASS,                             new Integer (integrity_constraint_violation._kiNO_SUBCLASS));
00419       _tSqlstateToIntMap.put (invalid_authorization_specification._kyNO_SUBCLASS,                        new Integer (invalid_authorization_specification._kiNO_SUBCLASS));
00420       _tSqlstateToIntMap.put (invalid_catalog_name._kyNO_SUBCLASS,                                       new Integer (invalid_catalog_name._kiNO_SUBCLASS));
00421       _tSqlstateToIntMap.put (invalid_character_set_name._kyNO_SUBCLASS,                                 new Integer (invalid_character_set_name._kiNO_SUBCLASS));
00422       _tSqlstateToIntMap.put (invalid_condition_number._kyNO_SUBCLASS,                                   new Integer (invalid_condition_number._kiNO_SUBCLASS));
00423       _tSqlstateToIntMap.put (invalid_connection_name._kyNO_SUBCLASS,                                    new Integer (invalid_connection_name._kiNO_SUBCLASS));
00424       _tSqlstateToIntMap.put (invalid_cursor_name._kyNO_SUBCLASS,                                        new Integer (invalid_cursor_name._kiNO_SUBCLASS));
00425       _tSqlstateToIntMap.put (invalid_cursor_state._kyNO_SUBCLASS,                                       new Integer (invalid_cursor_state._kiNO_SUBCLASS));
00426       _tSqlstateToIntMap.put (invalid_schema_name._kyNO_SUBCLASS,                                        new Integer (invalid_schema_name._kiNO_SUBCLASS));
00427       _tSqlstateToIntMap.put (invalid_sql_descriptor_name._kyNO_SUBCLASS,                                new Integer (invalid_sql_descriptor_name._kiNO_SUBCLASS));
00428       _tSqlstateToIntMap.put (invalid_sql_statement_name._kyNO_SUBCLASS,                                 new Integer (invalid_sql_statement_name._kiNO_SUBCLASS));
00429       _tSqlstateToIntMap.put (invalid_transaction_state._kyNO_SUBCLASS,                                  new Integer (invalid_transaction_state._kiNO_SUBCLASS));
00430       _tSqlstateToIntMap.put (invalid_transaction_termination._kyNO_SUBCLASS,                            new Integer (invalid_transaction_termination._kiNO_SUBCLASS));
00431       _tSqlstateToIntMap.put (no_data._kyNO_SUBCLASS,                                                    new Integer (no_data._kiNO_SUBCLASS));
00432       _tSqlstateToIntMap.put (remote_database_access._kyNO_SUBCLASS,                                     new Integer (remote_database_access._kiNO_SUBCLASS));
00433       _tSqlstateToIntMap.put (successful_completion._kyNO_SUBCLASS,                                      new Integer (successful_completion._kiNO_SUBCLASS));
00434       _tSqlstateToIntMap.put (syntax_error_or_access_rule_violation._kyNO_SUBCLASS,                      new Integer (syntax_error_or_access_rule_violation._kiNO_SUBCLASS));
00435       _tSqlstateToIntMap.put (syntax_error_or_access_rule_violation_in_direct_statement._kyNO_SUBCLASS,  new Integer (syntax_error_or_access_rule_violation_in_direct_statement._kiNO_SUBCLASS));
00436       _tSqlstateToIntMap.put (syntax_error_or_access_rule_violation_in_dynamic_statement._kyNO_SUBCLASS, new Integer (syntax_error_or_access_rule_violation_in_dynamic_statement._kiNO_SUBCLASS));
00437       _tSqlstateToIntMap.put (transaction_rollback._kyNO_SUBCLASS,                                       new Integer (transaction_rollback._kiNO_SUBCLASS));
00438       _tSqlstateToIntMap.put (transaction_rollback._kyINTEGRITY_CONSTRAINT_VIOLATION,                    new Integer (transaction_rollback._kiINTEGRITY_CONSTRAINT_VIOLATION));
00439       _tSqlstateToIntMap.put (transaction_rollback._kySERIALIZATION_FAILURE,                             new Integer (transaction_rollback._kiSERIALIZATION_FAILURE));
00440       _tSqlstateToIntMap.put (transaction_rollback._kySTATEMENT_COMPLETION_UNKNOWN,                      new Integer (transaction_rollback._kiSTATEMENT_COMPLETION_UNKNOWN));
00441       _tSqlstateToIntMap.put (triggered_data_change_violation._kyNO_SUBCLASS,                            new Integer (triggered_data_change_violation._kiNO_SUBCLASS));
00442       _tSqlstateToIntMap.put (warning._kyNO_SUBCLASS,                                                    new Integer (warning._kiNO_SUBCLASS));
00443       _tSqlstateToIntMap.put (warning._kyCURSOR_OPERATION_CONFLICT,                                      new Integer (warning._kiCURSOR_OPERATION_CONFLICT));
00444       _tSqlstateToIntMap.put (warning._kyDISCONNECT_ERROR,                                               new Integer (warning._kiDISCONNECT_ERROR));
00445       _tSqlstateToIntMap.put (warning._kyIMPLICIT_ZERO_BIT_PADDING,                                      new Integer (warning._kiIMPLICIT_ZERO_BIT_PADDING));
00446       _tSqlstateToIntMap.put (warning._kyINSUFFICIENT_ITEM_DESCRIPTOR_AREAS,                             new Integer (warning._kiINSUFFICIENT_ITEM_DESCRIPTOR_AREAS));
00447       _tSqlstateToIntMap.put (warning._kyNULL_VALUE_ELIMINATED_IN_SET_FUNCTION,                          new Integer (warning._kiNULL_VALUE_ELIMINATED_IN_SET_FUNCTION));
00448       _tSqlstateToIntMap.put (warning._kyPRIVILEGE_NOT_GRANTED,                                          new Integer (warning._kiPRIVILEGE_NOT_GRANTED));
00449       _tSqlstateToIntMap.put (warning._kyPRIVILEGE_NOT_REVOKED,                                          new Integer (warning._kiPRIVILEGE_NOT_REVOKED));
00450       _tSqlstateToIntMap.put (warning._kyQUERY_EXPRESSION_TOO_LONG_FOR_INFORMATION_SCHEMA,               new Integer (warning._kiQUERY_EXPRESSION_TOO_LONG_FOR_INFORMATION_SCHEMA));
00451       _tSqlstateToIntMap.put (warning._kySEARCH_CONDITION_TOO_LONG_FOR_INFORMATION_SCHEMA,               new Integer (warning._kiSEARCH_CONDITION_TOO_LONG_FOR_INFORMATION_SCHEMA));
00452       _tSqlstateToIntMap.put (warning._kySTRING_DATA_RIGHT_TRUNCATION,                                   new Integer (warning._kiSTRING_DATA_RIGHT_TRUNCATION));
00453       _tSqlstateToIntMap.put (with_check_option_violation._kyNO_SUBCLASS,                                new Integer (with_check_option_violation._kiNO_SUBCLASS));
00454     }
00455     return _tSqlstateToIntMap;
00456 
00457   }  // _getSqlstateToIntMap()
00458 
00459 
00460   //
00461   //  S E L E C T O R S
00462   //
00463 
00468   public static boolean _queryIsEmpty()
00469   {
00470     return ( _getUniqueValue() == no_data._kiNO_SUBCLASS );
00471   }
00472 
00477   public static boolean _queryHasSingleRow()
00478   {
00479     //
00480     //  Check if query has generated only *one* row.
00481     //
00482     return ( ( _getUniqueValue() != cardinality_violation._kiNO_SUBCLASS ) &&
00483              ( _getUniqueValue() != no_data._kiNO_SUBCLASS )                );
00484   }
00485 
00490   public static int _getUniqueValue()
00491   {
00492     return ((Integer) _getSqlstateToIntMap().get (SQLSTATE)).intValue();
00493   }
00494 
00500   public static int _getUniqueValue (final String kySQLSTATE)
00501   {
00502     return ((Integer) _getSqlstateToIntMap().get (kySQLSTATE)).intValue();
00503   }
00504 
00509   public static final String _getClassValue()
00510   {
00511     return _getClassValue (SQLSTATE);
00512   }
00513 
00518   public static final String _getClassValue (final String kySQLSTATE)
00519   {
00520 
00521     String   yClass;
00522 
00523     switch (_getUniqueValue (kySQLSTATE))
00524     {
00525       case ambiguous_cursor_name._kiNO_SUBCLASS:
00526       {
00527         yClass = "ambiguous cursor name";
00528         break;
00529       }
00530       case cardinality_violation._kiNO_SUBCLASS:
00531       {
00532         yClass = "cardinality violation";
00533         break;
00534       }
00535       case connection_exception._kiNO_SUBCLASS:
00536       case connection_exception._kiCONNECTION_DOES_NOT_EXIST:
00537       case connection_exception._kiCONNECTION_FAILURE:
00538       case connection_exception._kiCONNECTION_NAME_IN_USE:
00539       case connection_exception._kiSQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION:
00540       case connection_exception._kiSQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION:
00541       case connection_exception._kiTRANSACTION_RESOLUTION_UNKNOWN:
00542       {
00543         yClass = "connection exception";
00544         break;
00545       }
00546       case data_exception._kiNO_SUBCLASS:
00547       case data_exception._kiCHARACTER_NOT_IN_REPERTOIRE:
00548       case data_exception._kiDATETIME_FIELD_OVERFLOW:
00549       case data_exception._kiDIVISION_BY_ZERO:
00550       case data_exception._kiERROR_IN_ASSIGNMENT:
00551       case data_exception._kiINDICATOR_OVERFLOW:
00552       case data_exception._kiINTERVAL_FIELD_OVERFLOW:
00553       case data_exception._kiINVALID_CHARACTER_VALUE_FOR_CAST:
00554       case data_exception._kiINVALID_DATETIME_FORMAT:
00555       case data_exception._kiINVALID_ESCAPE_CHARACTER:
00556       case data_exception._kiINVALID_ESCAPE_SEQUENCE:
00557       case data_exception._kiINVALID_PARAMETER_VALUE:
00558       case data_exception._kiINVALID_TIME_ZONE_DISPLACEMENT_VALUE:
00559       case data_exception._kiNULL_VALUE_NO_INDICATOR_PARAMETER:
00560       case data_exception._kiNUMERIC_VALUE_OUT_OF_RANGE:
00561       case data_exception._kiSTRING_DATA_LENGTH_MISMATCH:
00562       case data_exception._kiSTRING_DATA_RIGHT_TRUNCATION:
00563       case data_exception._kiSUBSTRING_ERROR:
00564       case data_exception._kiTRIM_ERROR:
00565       case data_exception._kiUNTERMINATED_C_STRING:
00566       {
00567         yClass = "data exception";
00568         break;
00569       }
00570       case dependent_privilege_descriptors_still_exist._kiNO_SUBCLASS:
00571       {
00572         yClass = "dependent privilege descriptors still exist";
00573         break;
00574       }
00575       case dynamic_sql_error._kiNO_SUBCLASS:
00576       case dynamic_sql_error._kiCURSOR_SPECIFICATION_CANNOT_BE_EXECUTED:
00577       case dynamic_sql_error._kiINVALID_DESCRIPTOR_COUNT:
00578       case dynamic_sql_error._kiINVALID_DESCRIPTOR_INDEX:
00579       case dynamic_sql_error._kiPREPARED_STATEMENT_NOT_A_CURSOR_SPECIFICATION:
00580       case dynamic_sql_error._kiRESTRICTED_DATA_TYPE_ATTRIBUTE_VIOLATION:
00581       case dynamic_sql_error._kiUSING_CLAUSE_DOES_NOT_MATCH_DYNAMIC_PARAMETER_SPEC:
00582       case dynamic_sql_error._kiUSING_CLAUSE_DOES_NOT_MATCH_TARGET_SPEC:
00583       case dynamic_sql_error._kiUSING_CLAUSE_REQUIRED_FOR_DYNAMIC_PARAMETERS:
00584       case dynamic_sql_error._kiUSING_CLAUSE_REQUIRED_FOR_RESULT_FIELDS:
00585       {
00586         yClass = "dynamic SQL error";
00587         break;
00588       }
00589       case feature_not_supported._kiNO_SUBCLASS:
00590       case feature_not_supported._kiMULTIPLE_ENVIRONMENT_TRANSACTIONS:
00591       {
00592         yClass = "feature not supported";
00593         break;
00594       }
00595       case integrity_constraint_violation._kiNO_SUBCLASS:
00596       {
00597         yClass = "integrity constraint violation";
00598         break;
00599       }
00600       case invalid_authorization_specification._kiNO_SUBCLASS:
00601       {
00602         yClass = "invalid authorization specification";
00603         break;
00604       }
00605       case invalid_catalog_name._kiNO_SUBCLASS:
00606       {
00607         yClass = "invalid catalog name";
00608         break;
00609       }
00610       case invalid_character_set_name._kiNO_SUBCLASS:
00611       {
00612         yClass = "invalid character set name";
00613         break;
00614       }
00615       case invalid_condition_number._kiNO_SUBCLASS:
00616       {
00617         yClass = "invalid condition number";
00618         break;
00619       }
00620       case invalid_connection_name._kiNO_SUBCLASS:
00621       {
00622         yClass = "invalid connection name";
00623         break;
00624       }
00625       case invalid_cursor_name._kiNO_SUBCLASS:
00626       {
00627         yClass = "invalid cursor name";
00628         break;
00629       }
00630       case invalid_cursor_state._kiNO_SUBCLASS:
00631       {
00632         yClass = "invalid cursor state";
00633         break;
00634       }
00635       case invalid_schema_name._kiNO_SUBCLASS:
00636       {
00637         yClass = "invalid schema name";
00638         break;
00639       }
00640       case invalid_sql_descriptor_name._kiNO_SUBCLASS:
00641       {
00642         yClass = "invalid SQL descriptor name";
00643         break;
00644       }
00645       case invalid_sql_statement_name._kiNO_SUBCLASS:
00646       {
00647         yClass = "invalid SQL statement name";
00648         break;
00649       }
00650       case invalid_transaction_state._kiNO_SUBCLASS:
00651       {
00652         yClass = "invalid transaction state";
00653         break;
00654       }
00655       case invalid_transaction_termination._kiNO_SUBCLASS:
00656       {
00657         yClass = "invalid transaction termination";
00658         break;
00659       }
00660       case no_data._kiNO_SUBCLASS:
00661       {
00662         yClass = "no data";
00663         break;
00664       }
00665       case remote_database_access._kiNO_SUBCLASS:
00666       {
00667         yClass = "remote database access";
00668         break;
00669       }
00670       case successful_completion._kiNO_SUBCLASS:
00671       {
00672         yClass = "successful completion";
00673         break;
00674       }
00675       case syntax_error_or_access_rule_violation._kiNO_SUBCLASS:
00676       {
00677         yClass = "syntax error or access rule violation";
00678         break;
00679       }
00680       case syntax_error_or_access_rule_violation_in_direct_statement._kiNO_SUBCLASS:
00681       {
00682         yClass = "syntax error or access rule violation in direct statement";
00683         break;
00684       }
00685       case syntax_error_or_access_rule_violation_in_dynamic_statement._kiNO_SUBCLASS:
00686       {
00687         yClass = "syntax error or access rule violation in dynamic statement";
00688         break;
00689       }
00690       case transaction_rollback._kiNO_SUBCLASS:
00691       case transaction_rollback._kiINTEGRITY_CONSTRAINT_VIOLATION:
00692       case transaction_rollback._kiSERIALIZATION_FAILURE:
00693       case transaction_rollback._kiSTATEMENT_COMPLETION_UNKNOWN:
00694       {
00695         yClass = "transaction rollback";
00696         break;
00697       }
00698       case triggered_data_change_violation._kiNO_SUBCLASS:
00699       {
00700         yClass = "triggered data change violation";
00701         break;
00702       }
00703       case warning._kiNO_SUBCLASS:
00704       case warning._kiCURSOR_OPERATION_CONFLICT:
00705       case warning._kiDISCONNECT_ERROR:
00706       case warning._kiIMPLICIT_ZERO_BIT_PADDING:
00707       case warning._kiINSUFFICIENT_ITEM_DESCRIPTOR_AREAS:
00708       case warning._kiNULL_VALUE_ELIMINATED_IN_SET_FUNCTION:
00709       case warning._kiPRIVILEGE_NOT_GRANTED:
00710       case warning._kiPRIVILEGE_NOT_REVOKED:
00711       case warning._kiQUERY_EXPRESSION_TOO_LONG_FOR_INFORMATION_SCHEMA:
00712       case warning._kiSEARCH_CONDITION_TOO_LONG_FOR_INFORMATION_SCHEMA:
00713       case warning._kiSTRING_DATA_RIGHT_TRUNCATION:
00714       {
00715         yClass = "warning";
00716         break;
00717       }
00718       case with_check_option_violation._kiNO_SUBCLASS:
00719       {
00720         yClass = "with check option violation";
00721         break;
00722       }
00723       default:
00724       {
00725         yClass = "unknown code";
00726       }
00727     }
00728     return yClass;
00729   
00730   }  // _getClassValue()
00731       
00736   public static String _getDescription()
00737   {
00738     return _getDescription (SQLSTATE);
00739   }
00740 
00746   public static String _getDescription (final String kySQLSTATE)
00747   {
00748 
00749     StringBuffer   yDescription = new StringBuffer (_getClassValue (kySQLSTATE));
00750   
00751     yDescription.append (": ");
00752     yDescription.append (_getSubclassValue (kySQLSTATE));
00753     if ( SQLMESSAGE.length() > 0 )
00754     {
00755       yDescription.append (" (");
00756       yDescription.append (SQLMESSAGE);
00757       yDescription.append (")");
00758     }
00759     return yDescription.toString();
00760 
00761   }  // _getDescription()
00762 
00767   public static final String _getSubclassValue()
00768   {
00769     return _getSubclassValue (SQLSTATE);
00770   }
00771 
00776   public static final String _getSubclassValue (final String kySQLSTATE)
00777   {
00778   
00779     String   ySubclass = new String();
00780   
00781     switch (_getUniqueValue (kySQLSTATE))
00782     {
00783       case ambiguous_cursor_name._kiNO_SUBCLASS:
00784       case cardinality_violation._kiNO_SUBCLASS:
00785       case connection_exception._kiNO_SUBCLASS:
00786       case data_exception._kiNO_SUBCLASS:
00787       case dependent_privilege_descriptors_still_exist._kiNO_SUBCLASS:
00788       case dynamic_sql_error._kiNO_SUBCLASS:
00789       case feature_not_supported._kiNO_SUBCLASS:
00790       case integrity_constraint_violation._kiNO_SUBCLASS:
00791       case invalid_authorization_specification._kiNO_SUBCLASS:
00792       case invalid_catalog_name._kiNO_SUBCLASS:
00793       case invalid_character_set_name._kiNO_SUBCLASS:
00794       case invalid_condition_number._kiNO_SUBCLASS:
00795       case invalid_connection_name._kiNO_SUBCLASS:
00796       case invalid_cursor_name._kiNO_SUBCLASS:
00797       case invalid_cursor_state._kiNO_SUBCLASS:
00798       case invalid_schema_name._kiNO_SUBCLASS:
00799       case invalid_sql_descriptor_name._kiNO_SUBCLASS:
00800       case invalid_sql_statement_name._kiNO_SUBCLASS:
00801       case invalid_transaction_state._kiNO_SUBCLASS:
00802       case invalid_transaction_termination._kiNO_SUBCLASS:
00803       case no_data._kiNO_SUBCLASS:
00804       case remote_database_access._kiNO_SUBCLASS:
00805       case successful_completion._kiNO_SUBCLASS:
00806       case syntax_error_or_access_rule_violation._kiNO_SUBCLASS:
00807       case syntax_error_or_access_rule_violation_in_direct_statement._kiNO_SUBCLASS:
00808       case syntax_error_or_access_rule_violation_in_dynamic_statement._kiNO_SUBCLASS:
00809       case transaction_rollback._kiNO_SUBCLASS:
00810       case triggered_data_change_violation._kiNO_SUBCLASS:
00811       case warning._kiNO_SUBCLASS:
00812       case with_check_option_violation._kiNO_SUBCLASS:
00813       {
00814         ySubclass = "(no subclass)";
00815         break;
00816       }
00817       case connection_exception._kiCONNECTION_DOES_NOT_EXIST:
00818       {
00819         ySubclass = "connection does not exist";
00820         break;
00821       }
00822       case connection_exception._kiCONNECTION_FAILURE:
00823       {
00824         ySubclass = "connection failure";
00825         break;
00826       }
00827       case connection_exception._kiCONNECTION_NAME_IN_USE:
00828       {
00829         ySubclass = "connection name in use";
00830         break;
00831       }
00832       case connection_exception._kiSQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION:
00833       {
00834         ySubclass = "SQL-client unable to establish SQL-connection";
00835         break;
00836       }
00837       case connection_exception._kiSQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION:
00838       {
00839         ySubclass = "SQL-server rejected establishment of SQL-connection";
00840         break;
00841       }
00842       case connection_exception._kiTRANSACTION_RESOLUTION_UNKNOWN:
00843       {
00844         ySubclass = "transaction resolution unknown";
00845         break;
00846       }
00847       case data_exception._kiCHARACTER_NOT_IN_REPERTOIRE:
00848       {
00849         ySubclass = "character not in repertoire";
00850         break;
00851       }
00852       case data_exception._kiDATETIME_FIELD_OVERFLOW:
00853       {
00854         ySubclass = "datetime field overflow";
00855         break;
00856       }
00857       case data_exception._kiDIVISION_BY_ZERO:
00858       {
00859         ySubclass = "division by zero";
00860         break;
00861       }
00862       case data_exception._kiERROR_IN_ASSIGNMENT:
00863       {
00864         ySubclass = "error in assignment";
00865         break;
00866       }
00867       case data_exception._kiINDICATOR_OVERFLOW:
00868       {
00869         ySubclass = "indicator overflow";
00870         break;
00871       }
00872       case data_exception._kiINTERVAL_FIELD_OVERFLOW:
00873       {
00874         ySubclass = "interval field overflow";
00875         break;
00876       }
00877       case data_exception._kiINVALID_CHARACTER_VALUE_FOR_CAST:
00878       {
00879         ySubclass = "invalid character value for cast";
00880         break;
00881       }
00882       case data_exception._kiINVALID_DATETIME_FORMAT:
00883       {
00884         ySubclass = "invalid datetime format";
00885         break;
00886       }
00887       case data_exception._kiINVALID_ESCAPE_CHARACTER:
00888       {
00889         ySubclass = "invalid escape character";
00890         break;
00891       }
00892       case data_exception._kiINVALID_ESCAPE_SEQUENCE:
00893       {
00894         ySubclass = "invalid escape sequence";
00895         break;
00896       }
00897       case data_exception._kiINVALID_PARAMETER_VALUE:
00898       {
00899         ySubclass = "invalid parameter value";
00900         break;
00901       }
00902       case data_exception._kiINVALID_TIME_ZONE_DISPLACEMENT_VALUE:
00903       {
00904         ySubclass = "invalid time zone displacement value";
00905         break;
00906       }
00907       case data_exception._kiNULL_VALUE_NO_INDICATOR_PARAMETER:
00908       {
00909         ySubclass = "null value, no indicator parameter";
00910         break;
00911       }
00912       case data_exception._kiNUMERIC_VALUE_OUT_OF_RANGE:
00913       {
00914         ySubclass = "numeric value out of range";
00915         break;
00916       }
00917       case data_exception._kiSTRING_DATA_LENGTH_MISMATCH:
00918       {
00919         ySubclass = "string data, length mismatch";
00920         break;
00921       }
00922       case data_exception._kiSTRING_DATA_RIGHT_TRUNCATION:
00923       {
00924         ySubclass = "string data, right truncation";
00925         break;
00926       }
00927       case data_exception._kiSUBSTRING_ERROR:
00928       {
00929         ySubclass = "substring error";
00930         break;
00931       }
00932       case data_exception._kiTRIM_ERROR:
00933       {
00934         ySubclass = "trim error";
00935         break;
00936       }
00937       case data_exception._kiUNTERMINATED_C_STRING:
00938       {
00939         ySubclass = "unterminated C string";
00940         break;
00941       }
00942       case dynamic_sql_error._kiCURSOR_SPECIFICATION_CANNOT_BE_EXECUTED:
00943       {
00944         ySubclass = "cursor specification cannot be executed";
00945         break;
00946       }
00947       case dynamic_sql_error._kiINVALID_DESCRIPTOR_COUNT:
00948       {
00949         ySubclass = "invalid descriptor count";
00950         break;
00951       }
00952       case dynamic_sql_error._kiINVALID_DESCRIPTOR_INDEX:
00953       {
00954         ySubclass = "invalid descriptor index";
00955         break;
00956       }
00957       case dynamic_sql_error._kiPREPARED_STATEMENT_NOT_A_CURSOR_SPECIFICATION:
00958       {
00959         ySubclass = "prepared statement not a cursor specification";
00960         break;
00961       }
00962       case dynamic_sql_error._kiRESTRICTED_DATA_TYPE_ATTRIBUTE_VIOLATION:
00963       {
00964         ySubclass = "restricted data type attribute violation";
00965         break;
00966       }
00967       case dynamic_sql_error._kiUSING_CLAUSE_DOES_NOT_MATCH_DYNAMIC_PARAMETER_SPEC:
00968       {
00969         ySubclass = "using clause does not match dynamic parameter specifications";
00970         break;
00971       }
00972       case dynamic_sql_error._kiUSING_CLAUSE_DOES_NOT_MATCH_TARGET_SPEC:
00973       {
00974         ySubclass = "using clause does not match target specifications";
00975         break;
00976       }
00977       case dynamic_sql_error._kiUSING_CLAUSE_REQUIRED_FOR_DYNAMIC_PARAMETERS:
00978       {
00979         ySubclass = "using clause required for dynamic parameters";
00980         break;
00981       }
00982       case dynamic_sql_error._kiUSING_CLAUSE_REQUIRED_FOR_RESULT_FIELDS:
00983       {
00984         ySubclass = "using clause required for result fields";
00985         break;
00986       }
00987       case feature_not_supported._kiMULTIPLE_ENVIRONMENT_TRANSACTIONS:
00988       {
00989         ySubclass = "multiple environment transactions";
00990         break;
00991       }
00992       case transaction_rollback._kiINTEGRITY_CONSTRAINT_VIOLATION:
00993       {
00994         ySubclass = "integrity constraint violation";
00995         break;
00996       }
00997       case transaction_rollback._kiSERIALIZATION_FAILURE:
00998       {
00999         ySubclass = "serialization failure";
01000         break;
01001       }
01002       case transaction_rollback._kiSTATEMENT_COMPLETION_UNKNOWN:
01003       {
01004         ySubclass = "statement completion unknown";
01005         break;
01006       }
01007       case warning._kiCURSOR_OPERATION_CONFLICT:
01008       {
01009         ySubclass = "cursor operation conflict";
01010         break;
01011       }
01012       case warning._kiDISCONNECT_ERROR:
01013       {
01014         ySubclass = "disconnect error";
01015         break;
01016       }
01017       case warning._kiIMPLICIT_ZERO_BIT_PADDING:
01018       {
01019         ySubclass = "implicit zero-bit padding";
01020         break;
01021       }
01022       case warning._kiINSUFFICIENT_ITEM_DESCRIPTOR_AREAS:
01023       {
01024         ySubclass = "insufficient item descriptor areas";
01025         break;
01026       }
01027       case warning._kiNULL_VALUE_ELIMINATED_IN_SET_FUNCTION:
01028       {
01029         ySubclass = "null value eliminated in set function";
01030         break;
01031       }
01032       case warning._kiPRIVILEGE_NOT_GRANTED:
01033       {
01034         ySubclass = "privilege not granted";
01035         break;
01036       }
01037       case warning._kiPRIVILEGE_NOT_REVOKED:
01038       {
01039         ySubclass = "privilege not revoked";
01040         break;
01041       }
01042       case warning._kiQUERY_EXPRESSION_TOO_LONG_FOR_INFORMATION_SCHEMA:
01043       {
01044         ySubclass = "query expression too long for information schema";
01045         break;
01046       }
01047       case warning._kiSEARCH_CONDITION_TOO_LONG_FOR_INFORMATION_SCHEMA:
01048       {
01049         ySubclass = "search condition too long for information schema";
01050         break;
01051       }
01052       case warning._kiSTRING_DATA_RIGHT_TRUNCATION:
01053       {
01054         ySubclass = "string data, right truncation";
01055         break;
01056       }
01057       default:
01058       {
01059         ySubclass = "unknown code";
01060       }
01061     }
01062     return ySubclass;
01063   
01064   }  // _getSubclassValue()
01065 
01066 }  // class TState

Generated on Mon Oct 13 02:40:10 2003 for UESQLC by doxygen1.2.18