/********************************************************************************************************************************/ /* Created: 17-May-2011 10:41:55 by OpenVMS SDL EV2-3 */ /* Source: 17-MAY-2011 10:41:55 SQL$ALPHA_MV:[CODE]SQL_LITERALS.SDL;1 */ /********************************************************************************************************************************/ /* Copyright (c) 1995, 2011, Oracle Corporation. All Rights Reserved. */ /*** MODULE SQLCA_DEFINITIONS ***/ #pragma __member_alignment __save #pragma __nomember_alignment /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ /* */ /* S Q L C A . S D L Defines the SQL communications area */ /* */ /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ /* */ /* FACILITY: Rdb/SQL */ /* */ /* ABSTRACT: */ /* */ /* AUTHOR: R.ADAMS CREATION DATE: 17-FEB-1986. */ /* MODIFICATION HISTORY: */ /* */ /* Version 7.2 */ /* 5-Jan-11 05683 (IES) new SQLCODE and SQLSTATE values */ /* 27-Apr-09 05529 (IES) add new SQLDA_ROWID type */ /* 10-Feb-09 05496 (IES) use ASCII copyright notation */ /* 7-Jun-07 05311 (NJL) Correct last edit. */ /* 7-Jun-07 05310 (JEH) Add invalid substring SQLCODE and SQLSTATE */ /* Version 7.0 */ /* 16-Jan-96 02697 (PMB) Change copyright as necessary */ /* 23-FEB-1986 rga define literals for values of SQLCODE */ /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ /* */ /* Define values for SQLDA.SQLVAR.SQLTYPE */ /* */ #define SQLDA_VARCHAR 449 #define SQLDA_CHAR 453 /* The SQLDA_ constants have */ #define SQLDA_ROWID 455 /* values corresponding to */ #define SQLDA_FLOAT 481 /* the value placed in */ #define SQLDA_DECIMAL 485 /* SQLDA.SQLVAR.SQLTYPE by SQL. */ #define SQLDA_INTEGER 497 /* They represent the data type */ #define SQLDA_SMALLINT 501 /* of the select list item or */ #define SQLDA_DATE 503 /* parameter marker. */ #define SQLDA_QUADWORD 505 #define SQLDA_ASCIZ 507 #define SQLDA_SEGSTRING 509 #define SQLDA_TINYINT 515 #define SQLDA_VARBYTE 516 #define SQLDA2_DATETIME 519 #define SQLDA2_INTERVAL 521 #define SQLDA_SURROGATE 600 /* Reserved for future use */ /* */ /* Define values for datetime subtypes from DBL X4.5. DO NOT CHANGE THEM EVER. */ /* */ #define SQLDA2_DT_DATE 1 #define SQLDA2_DT_TIME 2 #define SQLDA2_DT_TIMESTAMP 3 #define SQLDA2_DT_TIME_TZ 4 #define SQLDA2_DT_TIMESTAMP_TZ 5 /* */ /* Define values for interval subtypes from DBL X4.5. DO NOT CHANGE THEM EVER. */ /* */ #define SQLDA2_DT_YEAR 1 #define SQLDA2_DT_MONTH 2 #define SQLDA2_DT_DAY 3 #define SQLDA2_DT_HOUR 4 #define SQLDA2_DT_MINUTE 5 #define SQLDA2_DT_SECOND 6 #define SQLDA2_DT_YEAR_MONTH 7 #define SQLDA2_DT_DAY_HOUR 8 #define SQLDA2_DT_DAY_MINUTE 9 #define SQLDA2_DT_DAY_SECOND 10 #define SQLDA2_DT_HOUR_MINUTE 11 #define SQLDA2_DT_HOUR_SECOND 12 #define SQLDA2_DT_MINUTE_SECOND 13 /* */ /* Define values for SQLCODE */ /* */ #define SQL$K_SQLCODE_OFFSET 12 /* Offset to sqlcode */ /* */ /* success status */ /* */ #define SQLCODE_SUCCESS 0 /* command completed successfully */ /* */ /* Warning statuses */ /* */ #define SQLCODE_EOS 100 /* SELECT or cursor got to end of stream */ #define SQLCODE_ELIM_NULL 1003 /* Null value eliminated in set function */ #define SQLCODE_TRUN_RTRV 1004 /* String truncated during assignment to a variable or parameter */ /* */ /* Error statuses */ /* */ #define SQLCODE_RDBERR -1 /* Rdb returned an error */ /* -2 TO -1000 are used for DB2 compatible errors */ #define SQLCODE_OUTOFRAN -304 /* Value is out of range for a host variable */ #define SQLCODE_NULLNOIND -305 /* NULL value and no indicator variable" */ #define SQLCODE_STR_DAT_TRUNC -306 /* String data, right truncation */ #define SQLCODE_INV_DATETIME -307 /* Invalid datetime format */ #define SQLCODE_CURNOTOPE -501 /* Cursor isn't open */ #define SQLCODE_CURALROPE -502 /* Cursor is already open */ #define SQLCODE_UDCURNOPE -507 /* Cursor in update or delete isn't opened */ #define SQLCODE_UDCURNPOS -508 /* Cursor in update or delete is not positioned on a record */ #define SQLCODE_UDCURDEL -509 /* Cursor in update or delete, positioned on a deleted record */ #define SQLCODE_NO_DUP -803 /* Duplicate on index */ #define SQLCODE_SELMORVAL -811 /* THE RESULT OF AN EMBEDDED SELECT RETURNED MORE THAN 1 VALUE */ #define SQLCODE_ROTXN -817 /* Read write operation in R-O txn */ #define SQLCODE_SVPTINVSPEC -880 /* Savepoint is invalid */ */ #define SQLCODE_SVPTEXIST -881 /* Savepoint already exists */ */ #define SQLCODE_SVPTNOEXIST -882 /* Savepoint does not exists */ */ #define SQLCODE_DEADLOCK -913 /* deadlock encountered */ /* -1001 to -1999 are reserved for DEC specific SQLCODEs */ #define SQLCODE_INTEG_FAIL -1001 /* Constraint failed */ #define SQLCODE_NOT_VALID -1002 /* Valid-if failed */ #define SQLCODE_LOCK_CONFLICT -1003 /* Lock conflict */ #define SQLCODE_BAD_TXN_STATE -1004 /* Invalid transaction state */ #define SQLCODE_NO_TXN -1005 /* No transaction */ #define SQLCODE_BAD_VERSION -1006 /* version of base system doesn't */ #define SQLCODE_TRIG_ERROR -1007 /* Trigger forced an error */ #define SQLCODE_NOIMPTXN -1008 /* No implicit transaction. */ #define SQLCODE_DISTIDERR -1009 /* Distrubuted TID Error. */ #define SQLCODE_BAD_CTX_VER -1010 /* Bad version in context struct */ #define SQLCODE_BAD_CTX_TYPE -1011 /* Bad type in context struct */ #define SQLCODE_BAD_CTX_LEN -1012 /* Bad length in context struct */ #define SQLCODE_BASROWDEL -1013 /* Row containing list deleted. */ #define SQLCODE_DIFFDEFINV -1014 /* Invoker was not the definer. */ #define SQLCODE_STMTNOTPRE -1015 /* Dynamic statement not prepared */ #define SQLCODE_NOSUCHCONN -1016 /* Connection doesn't exist */ #define SQLCODE_CONNAMEXI -1017 /* Connection name already exists */ #define SQLCODE_DBENVSYNERR -1018 /* Database Environment syntax errror */ #define SQLCODE_DBSPECSYNERR -1019 /* Database spec syntax error */ #define SQLCODE_ATTACHERR -1020 /* Error attaching to database */ #define SQLCODE_NOSUCHALIAS -1021 /* Alias not known */ #define SQLCODE_ALIASINUSE -1022 /* Alias already declared */ #define SQLCODE_COLEXISTS -1023 /* Column already exists in Table */ #define SQLCODE_COLNOTDEF -1024 /* Column not defined in Table */ #define SQLCODE_TBLEXISTS -1025 /* Table already exists in database */ #define SQLCODE_DOMEXISTS -1026 /* Domain already exists in database */ #define SQLCODE_DOMNOTDEF -1027 /* Domain not defined in database */ #define SQLCODE_NO_PRIV -1028 /* No privilege for attempted operation */ #define SQLCODE_BAD_LENGTH -1029 /* Negative length specified for column */ #define SQLCODE_BAD_SCALE -1030 /* Negative scale specified for column */ #define SQLCODE_RO_TABLE -1031 /* Attempt to update a RO table */ #define SQLCODE_OBSMETADATA -1032 /* Metadata no longer available */ #define SQLCODE_UNRES_REL -1033 /* Relation in req not reserved in trans */ #define SQLCODE_CASENOTFND -1034 /* Case not found: no WHEN for selector */ #define SQLCODE_CHKOPT_VIOL -1035 /* Integ failure w/ check option */ #define SQLCODE_UNTERM_C_STR -1036 /* Unterminated C string */ #define SQLCODE_INDIC_OVFLOW -1037 /* Indicator overflow */ #define SQLCODE_INV_PARAM_VAL -1038 /* Invalid parameter value */ #define SQLCODE_NULL_ELIMIN -1039 /* Null eliminated in set function */ #define SQLCODE_INV_ESC_SEQ -1040 /* Invalid escape sequence */ #define SQLCODE_RELNOTDEF -1041 /* Table not defined in database */ #define SQLCODE_RELNOTDCL -1041 /* Table not defined in database */ #define SQLCODE_SIGNAL_SQLSTATE -1042 /* SQLSTATE signaled */ #define SQLCODE_NORETSTMT -1043 /* no return statement */ #define SQLCODE_INVSUBSTRLEN -1044 /* Invalid substring length */ /* -2000 to -2999 are reserved for use by SQL Server */ /* -20000 to -20999 reserved to DB2 compatible errors */ #define SQLCODE_SVPTBADLOC -20111 /* Cannot use SAVEPOINT from function or trigger */ */ #pragma __member_alignment __restore