home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / PRECOM.ZIP / SQLCODES.DEF < prev    next >
Text File  |  1992-09-09  |  15KB  |  269 lines

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