home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 February / PCWK0296.iso / po7_win / db / rdbms71 / ocidem.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-07  |  3.5 KB  |  108 lines

  1. /*
  2.  * $Header: ocidem.h 7010300.1 94/02/24 18:40:35 snataraj Generic<base> $ 
  3.  */
  4.  
  5. /* Copyright (c) 1991 by Oracle Corporation */
  6. /*
  7.    NAME
  8.      ocidem.h - OCI demo header
  9.    MODIFIED   (MM/DD/YY)
  10.     emendez    02/02/94 -  Fix for bug 157576
  11.     jnlee      01/05/93 -  include oratypes.h once, make oci_func_tab static
  12.     rkooi2     10/26/92 -  More portability mods 
  13.     rkooi2     10/22/92 -  Change text back to char to avoid casts 
  14.     rkooi2     10/20/92 -  Changes to make it portable 
  15.     sjain      03/16/92 -  Creation 
  16. */
  17.  
  18. /*
  19.  *  ocidem.h
  20.  *
  21.  *  Declares additional functions and data structures
  22.  *  used in the OCI C sample programs.
  23.  */
  24.  
  25. #ifndef ORATYPES
  26. #include <oratypes.h>
  27. #endif /* ORATYPES */
  28.  
  29. #ifndef OCIDEM
  30. #define OCIDEM
  31.  
  32.  
  33. /*  internal/external datatype codes */
  34. #define VARCHAR2_TYPE            1
  35. #define NUMBER_TYPE              2
  36. #define INT_TYPE         3
  37. #define FLOAT_TYPE               4
  38. #define STRING_TYPE              5
  39. #define ROWID_TYPE              11
  40. #define DATE_TYPE               12
  41.  
  42. /*  ORACLE error codes used in demonstration programs */
  43. #define VAR_NOT_IN_LIST       1007
  44. #define NO_DATA_FOUND         1403
  45. #define NULL_VALUE_RETURNED   1405
  46.  
  47. /*  some SQL and OCI function codes */
  48. #define FT_INSERT                3
  49. #define FT_SELECT                4
  50. #define FT_UPDATE                5
  51. #define FT_DELETE                9
  52.  
  53. #define FC_OOPEN                14
  54.  
  55. /*
  56. ** Size of HDA area:
  57. ** 512 for 64 bit arquitectures
  58. ** 256 for 32 bit arquitectures
  59. */
  60.  
  61. #if (defined(__osf__) && defined(__alpha)) || defined(CRAY) || defined(KSR)
  62. # define HDA_SIZE 512
  63. #else
  64. # define HDA_SIZE 256
  65. #endif
  66.  
  67. /*
  68.  *  OCI function code labels,
  69.  *  corresponding to the fc numbers
  70.  *  in the cursor data area.
  71.  */
  72. static CONST text  *oci_func_tab[] =  {(text *) "not used",
  73. /* 1-2 */       (text *) "not used", (text *) "OSQL",
  74. /* 3-4 */       (text *) "not used", (text *) "OEXEC, OEXN",
  75. /* 5-6 */       (text *) "not used", (text *) "OBIND",
  76. /* 7-8 */       (text *) "not used", (text *) "ODEFIN",
  77. /* 9-10 */      (text *) "not used", (text *) "ODSRBN",
  78. /* 11-12 */     (text *) "not used", (text *) "OFETCH, OFEN",
  79. /* 13-14 */     (text *) "not used", (text *) "OOPEN",
  80. /* 15-16 */     (text *) "not used", (text *) "OCLOSE",
  81. /* 17-18 */     (text *) "not used", (text *) "not used",
  82. /* 19-20 */     (text *) "not used", (text *) "not used",
  83. /* 21-22 */     (text *) "not used", (text *) "ODSC",
  84. /* 23-24 */     (text *) "not used", (text *) "ONAME",
  85. /* 25-26 */     (text *) "not used", (text *) "OSQL3",
  86. /* 27-28 */     (text *) "not used", (text *) "OBNDRV",
  87. /* 29-30 */     (text *) "not used", (text *) "OBNDRN",
  88. /* 31-32 */     (text *) "not used", (text *) "not used",
  89. /* 33-34 */     (text *) "not used", (text *) "OOPT",
  90. /* 35-36 */     (text *) "not used", (text *) "not used",
  91. /* 37-38 */     (text *) "not used", (text *) "not used",
  92. /* 39-40 */     (text *) "not used", (text *) "not used",
  93. /* 41-42 */     (text *) "not used", (text *) "not used",
  94. /* 43-44 */     (text *) "not used", (text *) "not used",
  95. /* 45-46 */     (text *) "not used", (text *) "not used",
  96. /* 47-48 */     (text *) "not used", (text *) "not used",
  97. /* 49-50 */     (text *) "not used", (text *) "not used",
  98. /* 51-52 */     (text *) "not used", (text *) "OCAN",
  99. /* 53-54 */     (text *) "not used", (text *) "OPARSE",
  100. /* 55-56 */     (text *) "not used", (text *) "OEXFET",
  101. /* 57-58 */     (text *) "not used", (text *) "OFLNG",
  102. /* 59-60 */     (text *) "not used", (text *) "ODESCR",
  103. /* 61-62 */     (text *) "not used", (text *) "OBNDRA"
  104. };
  105.  
  106. #endif      /* OCIDEM */
  107.  
  108.