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