home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / sp15demo.zip / libsrc.zip / LIBSRC / SQLCODES.PAS < prev    next >
Pascal/Delphi Source File  |  1996-02-22  |  19KB  |  261 lines

  1. UNIT SQLCODES;
  2.  
  3. {**************************************************************************
  4.  *                                                                        *
  5.  * Module Name    = SQLCODES.H                                            *
  6.  *                                                                        *
  7.  * Descriptive Name = External Include file for SQLCODES                  *
  8.  *                                                                        *
  9.  * Copyright = 5622-044 (C) Copyright IBM Corp. 1988, 1993                *
  10.  *             Licensed Material - Program Property of IBM                *
  11.  *             Refer to Copyright Instructions Form Number G120-3083      *
  12.  *                                                                        *
  13.  * Function = Include File defining                                       *
  14.  *              SQLCODES                                                  *
  15.  *                                                                        *
  16.  **************************************************************************}
  17.  
  18. INTERFACE
  19.  
  20. USES OS2Def;
  21.  
  22. CONST
  23.           /* SQL Return Codes in SQLCODE */
  24.           SQL_RC_OK     =    0  ;       /* successful execution               */
  25.  
  26.                                         /* ------------ warnings ------------ */
  27.           SQL_RC_W012   =   12  ;       /* correlation without qualification  */
  28.           SQL_RC_W100   =  100  ;       /* eof                                */
  29.           SQL_RC_W139   =  139  ;       /* duplicate column conistraint       */
  30.           SQL_RC_W143   =  143  ;       /* invalid syntax ignored             */
  31.           SQL_RC_W541   =  541  ;       /* duplicate referential constraint   */
  32.           SQL_RC_W605   =  605  ;       /* index already exists */
  33.           SQL_RC_W965   =  965  ;       /* unknown SQL warning another product*/
  34.  
  35.                                         /* ------------- errors ------------- */
  36.           SQL_RC_E007   =   -7  ;       /* illegal character                  */
  37.           SQL_RC_E010   =  -10  ;       /* string constant not terminated     */
  38.           SQL_RC_E013   =  -13  ;       /* cursor or statement name = ""      */
  39.           SQL_RC_E051   =  -51  ;       /* reserved                           */
  40.           SQL_RC_E084   =  -84  ;       /* bad sql statement                  */
  41.  
  42.           SQL_RC_E101   = -101  ;       /* statement too long                 */
  43.           SQL_RC_E102   = -102  ;       /* string constant too long           */
  44.           SQL_RC_E103   = -103  ;       /* invalid numeric literal            */
  45.           SQL_RC_E104   = -104  ;       /* invalid character/token            */
  46.           SQL_RC_E105   = -105  ;       /* invalid string constant            */
  47.           SQL_RC_E107   = -107  ;       /* name too long                      */
  48.           SQL_RC_E108   = -108  ;       /* name has too many qualifiers       */
  49.           SQL_RC_E109   = -109  ;       /* clause not permitted               */
  50.           SQL_RC_E111   = -111  ;       /* no column name                     */
  51.           SQL_RC_E112   = -112  ;       /* operand is sql function            */
  52.           SQL_RC_E117   = -117  ;       /* wrong nbr of insert values         */
  53.           SQL_RC_E118   = -118  ;       /* object table in from clause        */
  54.           SQL_RC_E119   = -119  ;       /* column not in group by             */
  55.           SQL_RC_E120   = -120  ;       /* clause includes sql fn             */
  56.           SQL_RC_E121   = -121  ;       /* dup column name                    */
  57.           SQL_RC_E122   = -122  ;       /* no group by                        */
  58.           SQL_RC_E125   = -125  ;       /* no result column                   */
  59.           SQL_RC_E127   = -127  ;       /* dup distinct                       */
  60.           SQL_RC_E129   = -129  ;       /* too many table names               */
  61.           SQL_RC_E131   = -131  ;       /* incompatible data for like         */
  62.           SQL_RC_E132   = -132  ;       /* like predicate invalid             */
  63.           SQL_RC_E134   = -134  ;       /* improper use of long string        */
  64.           SQL_RC_E138   = -138  ;       /* substr arg out of range            */
  65.           SQL_RC_E142   = -142  ;       /* syntax not supported               */
  66.           SQL_RC_E150   = -150  ;       /* view not updatable                 */
  67.           SQL_RC_E151   = -151  ;       /* column not updatable               */
  68.           SQL_RC_E153   = -153  ;       /* no column list                     */
  69.           SQL_RC_E156   = -156  ;       /* command not allowed on view        */
  70.           SQL_RC_E157   = -157  ;       /* view name in foreign key           */
  71.           SQL_RC_E158   = -158  ;       /* nbr of columns does not match      */
  72.           SQL_RC_E159   = -159  ;       /* drop view on table                 */
  73.           SQL_RC_E160   = -160  ;       /* with check not allowed on view     */
  74.           SQL_RC_E161   = -161  ;       /* with check violation               */
  75.           SQL_RC_E170   = -170  ;       /* nbr of arguments invalid           */
  76.           SQL_RC_E171   = -171  ;       /* argument invalid                   */
  77.           SQL_RC_E172   = -172  ;       /* function name invalid              */
  78.           SQL_RC_E176   = -176  ;       /* translate scalar argument invalid  */
  79.           SQL_RC_E180   = -180  ;       /* datetime syntax invalid            */
  80.           SQL_RC_E181   = -181  ;       /* datetime value invalid             */
  81.           SQL_RC_E182   = -182  ;       /* datetime arithmetic invalid        */
  82.           SQL_RC_E183   = -183  ;       /* datetime arithmetic out of range   */
  83.           SQL_RC_E198   = -198  ;       /* no statement text                  */
  84.           SQL_RC_E199   =  -199 ;        /* illegal use of reserved word       */
  85.  
  86.           /* SQL Return Codes in SQLCODE */
  87.  
  88.           SQL_RC_E203   = -203  ;       /* ambiguous column reference         */
  89.           SQL_RC_E204   = -204  ;       /* undefined name                     */
  90.           SQL_RC_E205   = -205  ;       /* not a column                       */
  91.           SQL_RC_E206   = -206  ;       /* not a column of referenced tables  */
  92.           SQL_RC_E207   = -207  ;       /* cannot orderby column name w/union */
  93.           SQL_RC_E208   = -208  ;       /* column not part of result table    */
  94.           SQL_RC_E212   = -212  ;       /* duplicate table designator         */
  95.  
  96.           SQL_RC_E301   = -301  ;       /* host variable has invalid type     */
  97.           SQL_RC_E302   = -302  ;       /* host variable value too large      */
  98.           SQL_RC_E303   = -303  ;       /* data types not comparable          */
  99.           SQL_RC_E304   = -304  ;       /* value not in range of host var     */
  100.           SQL_RC_E305   = -305  ;       /* host var cannot be null            */
  101.           SQL_RC_E309   = -309  ;       /* host var should not be null        */
  102.           SQL_RC_E311   = -311  ;       /* length of host var is negative     */
  103.           SQL_RC_E312   = -312  ;       /* unusable host variable             */
  104.           SQL_RC_E313   = -313  ;       /* wrong nbr of host variables        */
  105.           SQL_RC_E332   = -332  ;       /* no conversn source-cp to target-cp */
  106.  
  107.           SQL_RC_E401   = -401  ;       /* operands not comparable            */
  108.           SQL_RC_E402   = -402  ;       /* invalid type for arithmetic op     */
  109.           SQL_RC_E404   = -404  ;       /* update/insert string too long      */
  110.           SQL_RC_E405   = -405  ;       /* numeric literal out of range       */
  111.           SQL_RC_E406   = -406  ;       /* derived value out of range         */
  112.           SQL_RC_E407   = -407  ;       /* column cannot be null              */
  113.           SQL_RC_E408   = -408  ;       /* invalid data type for column       */
  114.           SQL_RC_E409   = -409  ;       /* invalid operand for count          */
  115.           SQL_RC_E410   = -410  ;       /* float literal too long             */
  116.           SQL_RC_E412   = -412  ;       /* multiple columns in subquery       */
  117.           SQL_RC_E413   = -413  ;       /* overflow during data conversion    */
  118.           SQL_RC_E415   = -415  ;       /* incompatible data types for union  */
  119.           SQL_RC_E416   = -416  ;       /* long string in union               */
  120.           SQL_RC_E417   = -417  ;       /* invalid use of parameter markers   */
  121.           SQL_RC_E418   = -418  ;       /* parameter marker in select clause  */
  122.           SQL_RC_E419   = -419  ;       /* division produced negative scale   */
  123.           SQL_RC_E421   = -421  ;       /* diff number of columns for union   */
  124.           SQL_RC_E436   = -436  ;       /* C language char string missing null*/
  125.  
  126.           SQL_RC_E501   = -501  ;       /* cursor not open (fetch/close)      */
  127.           SQL_RC_E502   = -502  ;       /* cursor already open                */
  128.           SQL_RC_E503   = -503  ;       /* column not in update clause        */
  129.           SQL_RC_E504   = -504  ;       /* cursor name not defined            */
  130.           SQL_RC_E507   = -507  ;       /* cursor not open (update/delete)    */
  131.           SQL_RC_E508   = -508  ;       /* cursor not on a row                */
  132.           SQL_RC_E509   = -509  ;       /* table not same as for cursor       */
  133.           SQL_RC_E510   = -510  ;       /* table cannot be modified           */
  134.           SQL_RC_E511   = -511  ;       /* for update not allowed             */
  135.           SQL_RC_E514   = -514  ;       /* cursor not prepared                */
  136.           SQL_RC_E516   = -516  ;       /* describe not a prepared statement  */
  137.           SQL_RC_E517   = -517  ;       /* prepared statment not a select     */
  138.           SQL_RC_E518   = -518  ;       /* execute not a prepared statement   */
  139.           SQL_RC_E519   = -519  ;       /* statement has an open cursor       */
  140.           SQL_RC_E530   = -530  ;       /* invalid foreign key value          */
  141.           SQL_RC_E531   = -531  ;       /* cannot update primary key          */
  142.           SQL_RC_E532   = -532  ;       /* delete is restricted               */
  143.           SQL_RC_E533   = -533  ;       /* multi-row insert not allowed       */
  144.           SQL_RC_E534   = -534  ;       /* multi-row update of pk             */
  145.           SQL_RC_E535   = -535  ;       /* multi-row delete not allowed       */
  146.           SQL_RC_E536   = -536  ;       /* descendent in subquery             */
  147.           SQL_RC_E537   = -537  ;       /* dup column in key def              */
  148.           SQL_RC_E538   = -538  ;       /* foreign key does not match pk      */
  149.           SQL_RC_E539   = -539  ;       /* table does not have primary key    */
  150.           SQL_RC_E541   = -541  ;       /* duplicate referential constraint   */
  151.           SQL_RC_E542   = -542  ;       /* pk column cannot allow nulls       */
  152.           SQL_RC_E551   = -551  ;       /* authorization error w/obj insert   */
  153.           SQL_RC_E552   = -552  ;       /* auth error w/o obj ins             */
  154.           SQL_RC_E553   = -553  ;       /* SYSIBM qualifier                   */
  155.           SQL_RC_E554   = -554  ;       /* cannot grant privilege to self     */
  156.           SQL_RC_E555   = -555  ;       /* cannot revoke privilege from self  */
  157.           SQL_RC_E556   = -556  ;       /* revoke stmt denied--priv not held  */
  158.           SQL_RC_E557   = -557  ;       /* invalid combination of privileges  */
  159.           SQL_RC_E558   = -558  ;       /* revoke stmt denied--has CONTROL    */
  160.           SQL_RC_E562   = -562  ;       /* privilege not allowed for public   */
  161.           SQL_RC_E567   = -567  ;       /* invalid authorization id           */
  162.  
  163.           /* SQL Return Codes in SQLCODE */
  164.  
  165.           SQL_RC_E601   = -601  ;       /* duplicate table/view name          */
  166.           SQL_RC_E602   = -602  ;       /* too many columns in index          */
  167.           SQL_RC_E603   = -603  ;       /* cannot create unique index         */
  168.           SQL_RC_E604   = -604  ;       /* invalid length, precision, scale   */
  169.           SQL_RC_E607   = -607  ;       /* op not allowed on system tables    */
  170.           SQL_RC_E612   = -612  ;       /* duplicate column name              */
  171.           SQL_RC_E613   = -613  ;       /* primary key too long               */
  172.           SQL_RC_E614   = -614  ;       /* index key too long                 */
  173.           SQL_RC_E624   = -624  ;       /* table already has primary key      */
  174.           SQL_RC_E629   = -629  ;       /* foreign key is not nullable        */
  175.           SQL_RC_E631   = -631  ;       /* foreign key is too long            */
  176.           SQL_RC_E632   = -632  ;       /* delete rule restriction            */
  177.           SQL_RC_E633   = -633  ;       /* delete rule is restricted          */
  178.           SQL_RC_E634   = -634  ;       /* delete rule cannot be CASCADE      */
  179.           SQL_RC_E637   = -637  ;       /* dup pk or drop pk clause           */
  180.           SQL_RC_E638   = -638  ;       /* no column definitions              */
  181.           SQL_RC_E667   = -667  ;       /* ref constraint does not hold       */
  182.           SQL_RC_E669   = -669  ;       /* cannot drop primary key            */
  183.           SQL_RC_E670   = -670  ;       /* row length too large               */
  184.           SQL_RC_E673   = -673  ;       /* primary key not unique             */
  185.           SQL_RC_E680   = -680  ;       /* too many columns for table         */
  186.           SQL_RC_E683   = -683  ;       /* incompatible column constraint     */
  187.  
  188.           SQL_RC_E802   = -802  ;       /* arith overflow or divide by zero   */
  189.           SQL_RC_E803   = -803  ;       /* distinct violation                 */
  190.           SQL_RC_E804   = -804  ;       /* bad input parameters               */
  191.           SQL_RC_E805   = -805  ;       /* program not found                  */
  192.           SQL_RC_E811   = -811  ;       /* more than one row/value            */
  193.           SQL_RC_E818   = -818  ;       /* time stamp conflict                */
  194.           SQL_RC_E822   = -822  ;       /* invalid address in sqlda           */
  195.           SQL_RC_E840   = -840  ;       /* too many items in list             */
  196.  
  197.           SQL_RC_E902   = -902  ;       /* fatal error                        */
  198.           SQL_RC_E910   = -910  ;       /* drop pending                       */
  199.           SQL_RC_E911   = -911  ;       /* deadlock                           */
  200.           SQL_RC_E912   = -912  ;       /* too many lock requests             */
  201.           SQL_RC_E920   = -920  ;       /* reject DB connection to SA REQ     */
  202.           SQL_RC_E930   = -930  ;       /* insufficient storage               */
  203.           SQL_RC_E950   = -950  ;       /* cursors active on dropped object   */
  204.           SQL_RC_E951   = -951  ;       /* table in use - alter disallowed    */
  205.           SQL_RC_E952   = -952  ;       /* user cancel                        */
  206.           SQL_RC_E953   = -953  ;       /* agent heap too small               */
  207.           SQL_RC_E954   = -954  ;       /* application heap too small         */
  208.           SQL_RC_E955   = -955  ;       /* sort heap error                    */
  209.           SQL_RC_E956   = -956  ;       /* database heap too small            */
  210.           SQL_RC_E957   = -957  ;       /* requestor comm heap too small      */
  211.           SQL_RC_E958   = -958  ;       /* max nbr of files open              */
  212.           SQL_RC_E959   = -959  ;       /* server comm heap too small         */
  213.           SQL_RC_E960   = -960  ;       /* max nbr of files in database       */
  214.           SQL_RC_E961   = -961  ;       /* rqstr remote svcs heap too small   */
  215.           SQL_RC_E962   = -962  ;       /* svr remote svcs heap too small     */
  216.           SQL_RC_E964   = -964  ;       /* log file full                      */
  217.           SQL_RC_E966   = -966  ;       /* error opening sqlcode mapping file */
  218.           SQL_RC_E967   = -967  ;       /* format error in sqlcode map file   */
  219.           SQL_RC_E968   = -968  ;       /* disk full                          */
  220.           SQL_RC_E969   = -969  ;       /* unknown sql error another product  */
  221.           SQL_RC_E970   = -970  ;       /* read-only file                     */
  222.           SQL_RC_E972   = -972  ;       /* incorrect diskette                 */
  223.           SQL_RC_E974   = -974  ;       /* drive locked                       */
  224.           SQL_RC_E976   = -976  ;       /* diskette door open                 */
  225.           SQL_RC_E978   = -978  ;       /* diskette write-protected           */
  226.           SQL_RC_E980   = -980  ;       /* disk error                         */
  227.           SQL_RC_E982   = -982  ;       /* disk error on temp file            */
  228.           SQL_RC_E984   = -984  ;       /* unsuccessful commit or rollback    */
  229.           SQL_RC_E985   = -985  ;       /* file error - catalog file bad      */
  230.           SQL_RC_E986   = -986  ;       /* file error - file renamed          */
  231.           SQL_RC_E990   = -990  ;       /* index structure limit error        */
  232.           SQL_RC_E992   = -992  ;       /* release number incompatible        */
  233.           SQL_RC_E994   = -994  ;       /* reserved                           */
  234.           SQL_RC_E996   = -996  ;       /* reserved                           */
  235.  
  236.           SQL_RC_E1216  = -1216 ;       /* invalid use of graphic data        */
  237.  
  238.           SQL_RC_E30000 = -30000;       /* Distribution protocol error,       */
  239.                                         /*   no disconnect                    */
  240.           SQL_RC_E30020 = -30020;       /* Distribution protocol error,       */
  241.                                         /*   disconnect                       */
  242.           SQL_RC_E30021 = -30021;       /* Distribution compatibility error   */
  243.           SQL_RC_E30040 = -30040;       /* Distribution memory allocation err */
  244.           SQL_RC_E30041 = -30041;       /* Distribution memory allocation err */
  245.                                         /*   disconnect                       */
  246.           SQL_RC_E30050 = -30050;       /* Invalid command while bind in prog */
  247.           SQL_RC_E30051 = -30051;       /* Bind not active                    */
  248.           SQL_RC_E30053 = -30053;       /* Bind Owner authorization failure   */
  249.           SQL_RC_E30060 = -30060;       /* RDB authorization failure          */
  250.           SQL_RC_E30061 = -30061;       /* RDB not found                      */
  251.           SQL_RC_E30070 = -30070;       /* Distribution command error         */
  252.           SQL_RC_E30071 = -30071;       /* Distribution object error          */
  253.           SQL_RC_E30072 = -30072;       /* Distribution parameter error       */
  254.           SQL_RC_E30073 = -30073;       /* Distribution parameter value error */
  255.           SQL_RC_E30074 = -30074;       /* Distribution reply error           */
  256.           SQL_RC_E30080 = -30080;       /* Communication error                */
  257.           SQL_RC_E30090 = -30090;       /* Remote operation invalid           */
  258.  
  259. IMPLEMENTATION
  260.  
  261. END.