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