home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a524 / 42.ddi / lib / SQLCA.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-03-04  |  2.2 KB  |  81 lines

  1. /*
  2.  * $Header: sqlca.h,v 10301.3 89/02/22 11:07:56 nsalah Exp $ sqlca.h Copyr (c) 1987 Oracle
  3.  */
  4.  
  5. /* v1pcc,10301,v1pcc$src:[defs.10301] */
  6. /* Copyright (c) 1985,1986 by Oracle Corporation. */
  7.  
  8. /*
  9. NAME
  10.   SQLCA : SQL Communications Area.
  11. FUNCTION
  12.   Contains no code. Oracle fills in the SQLCA with status info
  13.   during the execution of a SQL stmt.
  14. NOTES
  15.   If the symbol SQLCA_STORAGE_CLASS is defined, then the SQLCA
  16.   will be defined to have this storage class. For example:
  17.  
  18.     #define SQLCA_STORAGE_CLASS extern
  19.  
  20.   will define the SQLCA as an extern.
  21.  
  22.   If the symbol SQLCA_INIT is defined, then the SQLCA will be
  23.   statically initialized. Although this is not necessary in order
  24.   to use the SQLCA, it is a good pgming practice not to have
  25.   unitialized variables. However, some C compilers/OS's don't
  26.   allow automatic variables to be init'd in this manner. Therefore,
  27.   if you are INCLUDE'ing the SQLCA in a place where it would be
  28.   an automatic AND your C compiler/OS doesn't allow this style
  29.   of initialization, then SQLCA_INIT should be left undefined --
  30.   all others can define SQLCA_INIT if they wish.
  31.  
  32. MODIFIED
  33.   Clare      12/06/84 - Ch SQLCA to not be an extern.
  34.   Clare      10/21/85 - Add initialization.
  35.   Bradbury   01/05/86 - Only initialize when SQLCA_INIT set
  36.   Clare      06/12/86 - Add SQLCA_STORAGE_CLASS option.
  37. */
  38.  
  39. #ifndef SQLCA
  40. #define SQLCA 1
  41.  
  42. struct   sqlca
  43.          {
  44.          /* ub1 */ char    sqlcaid[8];
  45.          /* b4  */ long    sqlabc;
  46.          /* b4  */ long    sqlcode;
  47.          struct
  48.            {
  49.            /* ub2 */ unsigned short sqlerrml;
  50.            /* ub1 */ char           sqlerrmc[70];
  51.            } sqlerrm;
  52.          /* ub1 */ char    sqlerrp[8];
  53.          /* b4  */ long    sqlerrd[6];
  54.          /* ub1 */ char    sqlwarn[8];
  55.          /* ub1 */ char    sqlext[8];
  56.          };
  57.  
  58. #ifdef   SQLCA_STORAGE_CLASS
  59. SQLCA_STORAGE_CLASS struct sqlca sqlca
  60. #else
  61.          struct sqlca sqlca
  62. #endif
  63.  
  64. #ifdef  SQLCA_INIT
  65.          = {
  66.          {'S', 'Q', 'L', 'C', 'A', ' ', ' ', ' '},
  67.          sizeof(struct sqlca),
  68.          0,
  69.          { 0, {0}},
  70.          {'N', 'O', 'T', ' ', 'S', 'E', 'T', ' '},
  71.          {0, 0, 0, 0, 0, 0},
  72.          {0, 0, 0, 0, 0, 0, 0, 0},
  73.          {0, 0, 0, 0, 0, 0, 0, 0}
  74.          }
  75. #endif
  76.          ;
  77.  
  78. #endif
  79.  
  80. /* end SQLCA */
  81.