home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p024 / 13.img / ASE1.LIB / ASIERR.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-08  |  17.0 KB  |  277 lines

  1. /*****************************************************************************
  2.     Name: asierr.h
  3.  
  4.     Description: ASI Error codes for AutoCAD SQL Interface
  5.  
  6.     Author: Nikolayev Alexander
  7.             Autodesk, Inc.
  8.             Moscow, Russia.
  9.  
  10.       (C) Copyright 1991-1992 by Autodesk, Inc.
  11.   ***************************************************************************
  12.       This program is copyrighted by Autodesk, Inc. and is  licensed
  13.       to you under the following conditions.  You may not distribute
  14.       or  publish the source code of this program in any form.   You
  15.       may  incorporate this code in object form in derivative  works
  16.       provided  such  derivative  works  are  (i.) are  designed and
  17.       intended  to  work  solely  with  Autodesk, Inc. products, and
  18.       (ii.)  contain  Autodesk's  copyright  notice  "(C)  Copyright
  19.       1988-1992 by Autodesk, Inc."
  20.    ***************************************************************************
  21.  
  22.       THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED
  23.       WARRANTY.  ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR
  24.       PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.
  25.  
  26.    ***************************************************************************
  27.                            RESTRICTED RIGHTS LEGEND 
  28.  
  29.       Use, duplication, or disclosure by the U.S. Government is subject 
  30.       to restrictions set forth in FAR 52.227-19 (Commerical Computer
  31.       Software - Restricted Rights) and DFAR 252.227-7013 (c) (1) (ii)
  32.       (Rights in Technical Data and Computer Software), as applicable.
  33.    ***************************************************************************
  34.  
  35.  
  36.     Entry Points:
  37.  
  38.     Modification History:
  39.        27 Jun 1991  -  ann  -    original written
  40.        17 Sep 1991  -  grisha  - added error codes for driver communication
  41.        13 Apr 1992  -  ann  - ASI_ERTABLOCKED error code was added.
  42.        14 Apr 1992  -  ann  - ESCAPE character support
  43.        20 Apr 1992  -  smw  - Misc. spelling corrections, new copyrights
  44.        06 May 1992  -  ann  - ASI_ERSYNWRUNIQUE error code was added
  45.        13 May 1992  -  ann  - Following syntax error codes were added:
  46.                               ASI_ERSYNWPRVACT, ASI_ERSYNWRGRANTEE,
  47.                               ASI_ERSYNVALEX, ASI_ERSYNMISTABELM,
  48.                               ASI_ERSYNMISKEY, ASI_ERSYNMISAS
  49.        15 May 1992  -  ann  - 59 and 60 messages are switched. 
  50.        24 May 1992  -  ann  - Error code ASI_ERSYNWRPRSC was added.
  51.        30 May 1992  -  ann  - Error code ASI_ERCONSTRAINT was added.
  52.          06 Jun 1992  -  ann  - Error code ASI_ERSYNNOTSINGL was added.
  53.  
  54.     Bugs and restriction on use:
  55.  
  56.     Notes:
  57.  
  58. *****************************************************************************/
  59. #ifndef __ASIERR__
  60. #define __ASIERR__
  61.  
  62. /****************************************************************/
  63. /*  DEFINES  */
  64. /****************************************************************/
  65. #define ASI_ERR            100   /* Error base number */
  66. #define ASI_DRVERR         200   /* Error base number to load, init driver */
  67.  
  68. /* Return Codes (Error codes) */
  69. #define ASI_OKAY             0   /* Everything OK */
  70. #define ASI_ERNOCDSC         1   /* Column descriptor is not initialized (asi_cds) */
  71. #define ASI_ERNORVAL         2   /* Row values are not present (asi_cvl)*/
  72. #define ASI_ERWRCOLNUM       3   /* Wrong column number (asi_cds, asi_cvl, asi_sob) */
  73. #define ASI_ERWRCOLNAME      4   /* Wrong column name (asi_upd) */
  74. #define ASI_ERTYPESMIS       5   /* Types mismatch */
  75. #define ASI_ERUNMEMORY       6   /* Insufficient memory for operation */
  76. #define ASI_ERWRCNCHDL       7   /* Wrong connection handle (asi_lof, asi_ohdl)*/
  77. #define ASI_ERWROP           8   /* Incompatible operations (All positioned stm) */
  78. #define ASI_ERWRBNDVAR       9   /* Wrong bind variable name (asi_bnd) */
  79. #define ASI_ERNOCURROW       10  /* No current row (out of set asi_upd, asi_del) */ 
  80. #define ASI_ERSTACKOVW       11  /* Stack overflow during parsing */
  81.  
  82. #define ASI_ERCANTCNC        12  /* Cannot connect to database */
  83. #define ASI_ERCANTDSCNC      13  /* Cannot disconnect from database */
  84. #define ASI_ERUNUPCSR        14  /* Unupdatable cursor */
  85. #define ASI_EROPNOTSUP       15  /* Driver does not support this operation */
  86. #define ASI_ERWRTAB          16  /* Table does not exist */
  87. #define ASI_ERWRCOL          17  /* Column does not exist */
  88. #define ASI_ERTABCRT         18  /* Table cannot be created */
  89. #define ASI_ERTABDROP        19  /* Table cannot be dropped */
  90. #define ASI_ERNOTBIND        20  /* Data was not bound in */
  91. #define ASI_ERWRBIND         21  /* Wrong data was bound in */
  92. #define ASI_ERZERODIV        22  /* Zerodivide */
  93. #define ASI_ERNOTUNIQUE      23  /* Attempt to insert non unique data */
  94. #define ASI_ERDATALOST       24  /* Data in database can't be stored */
  95. #define ASI_ERIDXCRT         25  /* Index can't be created */
  96. #define ASI_ERIDXDROP        26  /* Index can't be dropped */
  97. #define ASI_ERTABLOCKED      27  /* Table is locked */
  98. #define ASI_ERNOACCSRIGHT    28  /* User doesn't have access rights */
  99. #define ASI_ERCONSTRAINT     29    /* Constraint was not satisfied */
  100.  
  101. #define ASI_ERINDRVSERV      30  /* Error code returned by driver server */
  102.  
  103. #define ASI_END_OF_GEN       31  /* End of general error codes */
  104.  
  105. /* Syntax Error Codes */
  106. #define ASI_ERSYNWRTOKEN    ASI_ERR+1  /* Wrong token was met */
  107. #define ASI_ERSYNMISQUOT    ASI_ERR+2  /* Mismatched quotes */
  108. #define ASI_ERSYNNOLFPAR    ASI_ERR+3  /* Left parenthesis expected */
  109. #define ASI_ERSYNUNBALPAR   ASI_ERR+4  /* Unbalance parenthesis */
  110. #define ASI_ERSYNMISSEL     ASI_ERR+5  /* Subquery expected*/
  111. #define ASI_ERSYNMISCOMMA   ASI_ERR+6  /* Missing comma */
  112. #define ASI_ERSYNMISTABNAME ASI_ERR+7  /* Missing table name */
  113. #define ASI_ERSYNDUPLTAB    ASI_ERR+8  /* Duplicated table name in the FROM
  114.                                           clause */
  115. #define ASI_ERSYNMISFROM    ASI_ERR+9  /* Missing FROM in SELECT or DELETE */
  116. #define ASI_ERSYNINVGROUP   ASI_ERR+10 /* GROUP cannot be used in this case
  117.                                           (subquery) */
  118. #define ASI_ERSYNMISGROUP   ASI_ERR+11 /* Selection list contains AF and NAF
  119.                                           expr but GROUP BY clause was missed
  120.                                           or all SELECT columns must be
  121.                                           inside aggregate function */
  122. #define ASI_ERSYNINVHAVING  ASI_ERR+12 /* HAVING cannot be used in this case
  123.                                           (subquery) */
  124. #define ASI_ERSYNWRGROUP    ASI_ERR+13 /* Group columns do not match select
  125.                                           columns */
  126. #define ASI_ERSYNMISCOLVAL  ASI_ERR+14 /* Column and value lists mismatched in
  127.                                           insert */
  128. #define ASI_ERSYNMISSET     ASI_ERR+15 /* Missing SET keyword in UPDATE */
  129. #define ASI_ERSYNMISBECOME  ASI_ERR+16 /* = expected in UPDATE */
  130. #define ASI_ERSYNWRAGFUSE   ASI_ERR+17 /* Cannot use aggregate function in
  131.                                           this case */
  132. #define ASI_ERSYNWRSTAR     ASI_ERR+18 /* Wrong usage of * as AGF argument */
  133. #define ASI_ERSYNDUPLDIST   ASI_ERR+19 /* Duplicate DISTINCT in query spec */
  134. #define ASI_ERSYNINVDSF     ASI_ERR+20 /* Invalid use of DISTINCT set function */
  135. #define ASI_ERSYNINVCOUNT   ASI_ERR+21 /* Invalid usage of COUNT */
  136. #define ASI_ERSYNINVASF     ASI_ERR+22 /* Invalid use of ALL set function */ 
  137. #define ASI_ERSYNNOTALFNM   ASI_ERR+23 /* Left side should be alfanumeric */
  138. #define ASI_ERSYNNULL       ASI_ERR+24 /* NULL expected */
  139. #define ASI_ERSYNCOMPARE    ASI_ERR+25 /* Compare operator expected */
  140. #define ASI_ERSYNWRNOT      ASI_ERR+26 /* Wrong usage of NOT */
  141. #define ASI_ERSYNMASK       ASI_ERR+27 /* Mask should follow LIKE */
  142. #define ASI_ERSYNMISCOL     ASI_ERR+28 /* Missing column specification */
  143. #define ASI_ERSYNWRSQUERY   ASI_ERR+29 /* Check condition can't include subquery */
  144. #define ASI_ERSYNWRAF       ASI_ERR+30 /* Check condition should not contain AF  */
  145. #define ASI_ERSYNDIFCOL     ASI_ERR+31 /* Wrong column in constraint */
  146. #define ASI_ERSYNDUPLCOL    ASI_ERR+32 /* Duplicated column specified (create) */
  147. #define ASI_ERSYNMISINDEX   ASI_ERR+33 /* Missing Index  */
  148. #define ASI_ERSYNDUPLXCOL   ASI_ERR+34 /* Duplicate column in index */
  149. #define ASI_ERSYNWRNUM      ASI_ERR+35 /* Should be positive unsigned number */
  150. #define ASI_ERSYNTOOSHORT   ASI_ERR+36 /* Length of string is not enough to
  151.                                           store data */
  152. #define ASI_ERSYNTOOLONG    ASI_ERR+37 /* Default string is too long */
  153. #define ASI_ERSYNMISNOTNULL ASI_ERR+38 /* Unique column should have NOT NULL
  154.                                           constraint */
  155. #define ASI_ERSYNWRUNGCOL   ASI_ERR+39 /* Unmatched column in unique column list */
  156. #define ASI_ERSYNDUPLUCOL   ASI_ERR+40 /* Duplicate column in unique list */
  157. #define ASI_ERSYNDUPLRGCOL  ASI_ERR+41 /* Duplicate referencing columns */
  158. #define ASI_ERSYNDUPLRDCOL  ASI_ERR+42 /* Duplicate referenced columns */
  159. #define ASI_ERSYNUNEQLCOL   ASI_ERR+43 /* Referencing columns != referenced
  160.                                           columns */
  161. #define ASI_ERSYNMISPRV     ASI_ERR+44 /* Privileges were not specified */
  162. #define ASI_ERSYNMISGRANT   ASI_ERR+45 /* Grantee was not specified */
  163. #define ASI_ERSYNMISIDENT   ASI_ERR+46 /* Missing identifier */
  164. #define ASI_ERSYNEMPTYLIST  ASI_ERR+47 /* List of columns is empty */
  165. #define ASI_ERSYNWRSORT     ASI_ERR+48 /* Wrong sort specification */
  166. #define ASI_ERSYNWRTABUSE   ASI_ERR+49 /* Wrong table in search condition 
  167.                                           (UPDATE & DELETE searched) */
  168. #define ASI_ERSYNDUPLCOLU   ASI_ERR+50 /* Duplicated column spec in UPDATE
  169.                                           or INSERT */
  170. #define ASI_ERSYNWRCOLSPEC  ASI_ERR+51 /* Wrong column specification */
  171. #define ASI_ERSYNSORTSPEC   ASI_ERR+52 /* Wrong sort specification */
  172. #define ASI_ERSYNUNION      ASI_ERR+53 /* Query term mismatch */
  173. #define ASI_ERSYNCOLVALMIS  ASI_ERR+54 /* Column list does not match value list */
  174. #define ASI_ERSYNAGFOUT     ASI_ERR+55  /* AGF argument in WHERE clause should
  175.                                            be an outer reference */
  176. #define ASI_ERSYNINERCOLREF ASI_ERR+56  /* Column should be an inner reference */
  177. #define ASI_ERSYNAMBCOL     ASI_ERR+57  /* Ambiguous column reference */
  178. #define ASI_ERSYNSQVALUE    ASI_ERR+58  /* Subquery in comparision does't return
  179.                                            any value or returns more that one
  180.                                            value */
  181. #define ASI_ERSYNMISOPTION  ASI_ERR+59  /* OPTION keyword was missed */
  182. #define ASI_ERSYNMISCHECK   ASI_ERR+60  /* CHECK keyword was missed */
  183. #define ASI_ERSYNNUMEX      ASI_ERR+61  /* Number expected */
  184. #define ASI_ERSYNTYPEEX     ASI_ERR+62  /* Data type expected */
  185. #define ASI_ERSYNLITEX      ASI_ERR+63  /* Literal expected */
  186. #define ASI_ERSYNNULLEX     ASI_ERR+64  /* NULL keyword expected (CREATE) */
  187. #define ASI_ERSYNTVIUEX     ASI_ERR+65  /* TABLE, VIEW, INDEX or UNIQUE exp */
  188. #define ASI_ERSYNTABEX      ASI_ERR+66  /* TABLE keyword exp */
  189. #define ASI_ERSYNWRNULL     ASI_ERR+67  /* NULL is not allowed */
  190. #define ASI_ERSYNANDBET     ASI_ERR+68  /* AND was missed in BETWEEN */
  191. #define ASI_ERSYNSELORVAL   ASI_ERR+69  /* Select or VALUE in insert */   
  192. #define ASI_ERSYNWRBINDVAR  ASI_ERR+70  /* Wrong bind variable specification */
  193. #define ASI_ERSYNWRTABSPEC  ASI_ERR+71  /* Wrong table specification */
  194. #define ASI_ERSYNGRANTEX    ASI_ERR+72  /* GRANT keyword expected */
  195. #define ASI_ERSYNMISON      ASI_ERR+73  /* Missing ON keyword */
  196. #define ASI_ERSYNMISFROMR   ASI_ERR+74  /* Missing from in REVOKE */
  197. #define ASI_ERSYNMISTO      ASI_ERR+75  /* MIssing TO keyword */
  198. #define ASI_ERSYNPRVEX      ASI_ERR+76  /* PRIVILEGES was missed */
  199. #define ASI_ERSYNEXPREX     ASI_ERR+77  /* Value expression expected */
  200. #define ASI_ERSYNMISINTO    ASI_ERR+78  /* Missing INTO keyword */
  201. #define ASI_ERSYNESC        ASI_ERR+79  /* Escape character expected */
  202. #define ASI_ERSYNESCLEN     ASI_ERR+80  /* Not 1 escape character length */
  203. #define ASI_ERSYNESCUSE     ASI_ERR+81  /* Wrong escape character usage */
  204. #define ASI_ERSYNMISVAL     ASI_ERR+82  /* Value list was missed in INSERT */
  205. #define ASI_ERSYNLONGCNAME  ASI_ERR+83     /* Long column name. Must be <= 18 */
  206. #define ASI_ERSYNLONGAID    ASI_ERR+84     /* Long authorixation id. Must be <= 18  */
  207. #define ASI_ERSYNLONGTID    ASI_ERR+85     /* Long table id. Must be <= 18  */
  208. #define ASI_ERSYNLONGEVN    ASI_ERR+86  /* Long embeded variable name <= 32  */
  209. #define ASI_ERSYNLONGVNAME  ASI_ERR+87  /* Long view name */
  210. #define ASI_ERSYNLONGINAME  ASI_ERR+88  /* Long index name */
  211. #define ASI_ERSYNWRUNIQUE   ASI_ERR+89  /* NOT NULL is absent in UNIQUE constraint */
  212. #define ASI_ERSYNWPRVACT    ASI_ERR+90  /* Wrong privileges action */
  213. #define ASI_ERSYNWRGRANTEE  ASI_ERR+91  /* Wrong grantee specification */
  214. #define ASI_ERSYNVALEX      ASI_ERR+92  /* Value specification was wrong */
  215. #define ASI_ERSYNMISTABELM  ASI_ERR+93  /* Missing table element */
  216. #define ASI_ERSYNMISKEY     ASI_ERR+94  /* Missing keyword KEY */
  217. #define ASI_ERSYNMISAS      ASI_ERR+95  /* Missing keyword AS */
  218. #define ASI_ERSYNWRPRSC         ASI_ERR+96  /* Wrong precision or scale */
  219. #define ASI_ERSYNNOTSINGL   ASI_ERR+97  /* Must be single value expression or * */
  220. #define ASI_END_OF_SYN     (ASI_ERR+98) /* End of syntax error codes */
  221.  
  222. /* Driver communication errors */
  223. /* Error codes to load, init and pass control to drivers */
  224. #define ASI_ERDRVOPEN       (ASI_DRVERR+1)  /* Cannot open ASI driver file */
  225. #define ASI_ERDRVPATH       (ASI_DRVERR+2)  /* Path not found */
  226. #define ASI_ERDRVINVEXE     (ASI_DRVERR+3)  /* Invalid ASI driver executable
  227.                                                format */
  228. #define ASI_ERDRVMANYFILE   (ASI_DRVERR+4)  /* Too many open files */
  229. #define ASI_ERDRVACCESS     (ASI_DRVERR+5)  /* Access denied */
  230. #define ASI_ERDRVINVHDL     (ASI_DRVERR+6)  /* Invalid file handle */
  231. #define ASI_ERDRVSHARE      (ASI_DRVERR+7)  /* Sharing violation */
  232. #define ASI_ERDRVFLAT       (ASI_DRVERR+8)  /* Not a FLAT model .EXP file */
  233. #define ASI_ERDRVBEXP       (ASI_DRVERR+9)  /* Invalid .EXP file format */
  234. #define ASI_ERDRVOFFSET     (ASI_DRVERR+10) /* -OFFSET not multiple of 4K */
  235. #define ASI_ERDRVPARM       (ASI_DRVERR+11) /* These parameters not supported in 
  236.                                                protected mode driver: 
  237.                                                -NOPAGE and -REALBREAK or -OFFSET */
  238. #define ASI_ERDRVOUTPHYS    (ASI_DRVERR+12) /* Out of physical memory */
  239. #define ASI_ERDRVOUTSWAP    (ASI_DRVERR+13) /* Out of swap space */
  240. #define ASI_ERDRVRGROWLDT   (ASI_DRVERR+14) /* Unable to grow LDT */
  241. #define ASI_ERDRVCNGSEL     (ASI_DRVERR+15) /* Unable to change ext mem alloc
  242.                                                mark */
  243. #define ASI_ERDRVINSVIR     (ASI_DRVERR+16) /* Insufficient virtual memory
  244.                                                space */
  245. #define ASI_ERDRVINSCONV    (ASI_DRVERR+17) /* Insufficient conventional
  246.                                                memory space */
  247. #define ASI_ERDRVENOMEM     (ASI_DRVERR+18) /* No memory for ASE driver swapping */
  248. #define ASI_ERDRVACADASE    (ASI_DRVERR+19) /* Cannot open ACAD.ASE file in
  249.                                                current dir */
  250. #define ASI_ERDRVNOENV      (ASI_DRVERR+20) /* Environment name not specified */
  251. #define ASI_ERDRVBADENV     (ASI_DRVERR+21) /* Incompatible environment */
  252. #define ASI_ERDRVNOPATH     (ASI_DRVERR+22) /* Driver path and name was not
  253.                                                specified */
  254. #define ASI_ERBADDRVID      (ASI_DRVERR+23) /* Driver id is bad, driver not
  255.                                                init */
  256. #define ASI_ERNOFREEREC     (ASI_DRVERR+24) /* Too many driver loaded > MAX_MODUL */
  257. #define ASI_ERINTER         (ASI_DRVERR+25) /* Internal error found */
  258. #define ASI_ERTSRNOTDRV     (ASI_DRVERR+26) /* Program referenced in ACAD.ASE is not an
  259.                                                ASE driver, but it was terminated by 
  260.                                                TSR call */
  261. #define ASI_ERBADDOSENV     (ASI_DRVERR+27) /* Bad format for DOS environment */
  262. #define ASI_ERDRVINIT       (ASI_DRVERR+28) /* Error found durring driver
  263.                                                initialization */
  264. #define ASI_ERDRVMNG        (ASI_DRVERR+29) /* Cannot link with ASEMMNG */
  265. #define ASI_ERDRVCOMBUF     (ASI_DRVERR+30) /* Cannot create communication
  266.                                                buffer */
  267. #define ASI_ERDRVBADMEM     (ASI_DRVERR+31) /* User has loaded TSR from
  268.                                                AutoCAD shell command */
  269. #define ASI_ERDRVNOFND      (ASI_DRVERR+32) /* Driver not found in ACAD.ASE */
  270. #define ASI_ERDRVUNCENV     (ASI_DRVERR+33) /* Incompatible environment */
  271. #define ASI_ERINDOS         (ASI_DRVERR+34) /* DOS error */
  272.  
  273. #define ASI_END_OF_DRV      (ASI_DRVERR+35) /* End of driver error codes */
  274.  
  275. #endif /* __ASIERR__ */
  276. /*EOF*/
  277.