ocidfn.inc 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. {
  2. Automatically converted by H2Pas 1.0.0 from ocidfn.h
  3. The following command line parameters were used:
  4. -p
  5. -D
  6. -l
  7. jojo.so
  8. ocidfn.h
  9. }
  10. {$PACKRECORDS C}
  11. {
  12. * $Header: ocidfn.h 25-nov-2002.11:03:03 srseshad Exp $
  13. }
  14. { Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved. }
  15. { Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved. }
  16. {
  17. NAME
  18. ocidfn.h - OCI Definations
  19. NOTES
  20. Shipped to users.
  21. MODIFIED (MM/DD/YY)
  22. srseshad 11/25/02 - change binary float/double codes
  23. srseshad 11/14/02 - Add SQLT_IBFLOAT, SQLT_IBDOUBLE
  24. mxyang 09/17/02 - grabtrans 'mmorsi_obj_float'
  25. srseshad 09/06/02 - Add binary float/double
  26. aahluwal 06/04/02 - bug 2360115
  27. kmuthukk 05/02/00 - add SQLT_PNTY
  28. amangal 07/30/99 - Merge into 8.1.6 : Bug 879031
  29. tnbui 07/28/99 - Remove SQLT_TIMESTAMP_ITZ
  30. tnbui 07/21/99 - SQLT_TIMESTAMP_LTZ
  31. tnbui 06/16/99 - TIMESTAMP WITH IMPLICIT TIME ZONE
  32. whe 04/07/99 - bug#810075
  33. whe 03/19/99 - lrg 32079 etc.: move HDA def from ocidem.h to ocidfn.
  34. skmishra 05/10/98 -
  35. vyanaman 04/16/98 - update sql92 datatypes
  36. khnguyen 01/16/98 -
  37. khnguyen 12/23/97 - SQLT* for datetimes and intervals
  38. tanguyen 08/19/97 -
  39. dchatter 03/18/97 - porting exception 390897
  40. dchatter 05/02/97 - merge porting exception
  41. dalpern 12/04/96 - SQLCS_LIT_NULL added
  42. cxcheng 11/14/96 - add SQLT_BFILE/SQLT_CFILE to fix compile prob
  43. cxcheng 11/12/96 - add SQLT_NCO for named collection
  44. lchidamb 10/17/96 - add SQLT_VST and SQLT_ODT
  45. sgollapu 10/14/96 - Mutual exclusion of ocidfn and sqldef
  46. sgollapu 10/07/96 - OCI Simplification
  47. aroy 09/09/96 - add SQLCS* definitions
  48. slari 08/07/96 - add SQLT_RDD, rowid descriptor
  49. slari 06/12/96 - remove SQLT_TTBL
  50. dchatter 04/21/96 - prepare for merge into main
  51. slari 08/24/95 - b299432, define CDA_SIZE
  52. zwalcott 02/28/96 - add SQLT_BFILEE and SQLT_CFILEE.
  53. lchidamb 02/22/96 - make dtys consistent with dtydef.h
  54. lchidamb 02/16/96 - add SQLT_BFILEE and SQLT_CFILEE
  55. lchidamb 01/30/96 - rename new datatypes for v8
  56. lchidamb 09/06/95 - add new datatypes
  57. slari 05/11/95 - add OCI_EV_DEF and OCI_EV_TSF
  58. dchatter 04/06/95 - add ifdef flags around OCI_flags
  59. dchatter 03/08/95 - piece values
  60. dchatter 03/06/95 - merge changes from branch 1.2.720.3
  61. jfbrown 02/17/95 - merge changes from branch 1.2.720.2
  62. dchatter 02/08/95 - olog call modes
  63. jfbrown 02/03/95 - remove non-printable characters
  64. lchidamb 12/06/94 - merge changes from branch 1.2.720.1
  65. lchidamb 10/04/94 - added field chk to cda_head, cda_def
  66. dchatter 07/05/94 - SQLT_CUR added
  67. rkooi2 11/27/92 - Changing e* datatypes to s*
  68. rkooi2 10/26/92 - More portability mods
  69. rkooi2 10/22/92 - Added #ifndef ORATYPES ...
  70. rkooi2 10/18/92 - Changes to make it portable.
  71. sjain 03/16/92 - Creation
  72. }
  73. {
  74. * ocidfn.h
  75. *
  76. * Common header file for OCI C sample programs.
  77. * This header declares the cursor and logon data area structure.
  78. * The types used are defined in <oratypes.h>.
  79. *
  80. }
  81. { The cda_head struct is strictly PRIVATE. It is used
  82. internally only. Do not use this struct in OCI programs. }
  83. type
  84. Pdvoid = pointer;
  85. Ppdvoid = ^Pdvoid;
  86. PPpdvoid = ^PPdvoid;
  87. type
  88. Pcda_head = ^cda_head;
  89. cda_head = record
  90. v2_rc : sb2;
  91. ft : ub2;
  92. rpc : ub4;
  93. peo : ub2;
  94. fc : ub1;
  95. rcs1 : ub1;
  96. rc : ub2;
  97. wrn : ub1;
  98. rcs2 : ub1;
  99. rcs3 : sword;
  100. rid : record
  101. rd : record
  102. rcs4 : ub4;
  103. rcs5 : ub2;
  104. rcs6 : ub1;
  105. end;
  106. rcs7 : ub4;
  107. rcs8 : ub2;
  108. end;
  109. ose : sword;
  110. chk : ub1;
  111. rcsp : Pdvoid;
  112. end;
  113. {
  114. ** Size of HDA area:
  115. ** 512 for 64 bit arquitectures
  116. ** 256 for 32 bit arquitectures
  117. }
  118. { $if defined(SS_64BIT_SERVER) || defined(__64BIT__)}
  119. // const
  120. // HDA_SIZE = 512;
  121. { $else}
  122. const
  123. HDA_SIZE = 256;
  124. { $endif}
  125. { $if defined(SS_64BIT_SERVER) || defined(__64BIT__)}
  126. // const
  127. // CDA_SIZE = 88;
  128. { $else}
  129. const
  130. CDA_SIZE = 64;
  131. { $endif}
  132. { the real CDA, padded to CDA_SIZE bytes in size }
  133. { V2 return code }
  134. { SQL function type }
  135. { rows processed count }
  136. { parse error offset }
  137. { OCI function code }
  138. { filler area }
  139. { V7 return code }
  140. { warning flags }
  141. { reserved }
  142. { reserved }
  143. { rowid structure }
  144. { OSD dependent error }
  145. { pointer to reserved area }
  146. { ub1 rcs9[CDA_SIZE - sizeof (struct cda_head)]; filler }
  147. type
  148. Pcda_def = ^cda_def;
  149. cda_def = record
  150. v2_rc : sb2;
  151. ft : ub2;
  152. rpc : ub4;
  153. peo : ub2;
  154. fc : ub1;
  155. rcs1 : ub1;
  156. rc : ub2;
  157. wrn : ub1;
  158. rcs2 : ub1;
  159. rcs3 : sword;
  160. rid : record
  161. rd : record
  162. rcs4 : ub4;
  163. rcs5 : ub2;
  164. rcs6 : ub1;
  165. end;
  166. rcs7 : ub4;
  167. rcs8 : ub2;
  168. end;
  169. ose : sword;
  170. chk : ub1;
  171. rcsp : Pdvoid;
  172. end;
  173. { the logon data area (LDA)
  174. is the same shape as the CDA }
  175. Lda_def = cda_Def;
  176. PLda_def = ^Lda_def;
  177. { OCI Environment Modes for opinit call }
  178. { default single-threaded environment }
  179. const
  180. OCI_EV_DEF = 0;
  181. { thread-safe environment }
  182. OCI_EV_TSF = 1;
  183. { OCI Logon Modes for olog call }
  184. { default login }
  185. OCI_LM_DEF = 0;
  186. { non-blocking logon }
  187. OCI_LM_NBL = 1;
  188. {
  189. * since sqllib uses both ocidef and ocidfn the following defines
  190. * need to be guarded
  191. }
  192. { OCI_*_PIECE defines the piece types that are returned or set
  193. }
  194. { there or this is the only piece }
  195. const
  196. OCI_ONE_PIECE = 0;
  197. { the first of many pieces }
  198. OCI_FIRST_PIECE = 1;
  199. { the next of many pieces }
  200. OCI_NEXT_PIECE = 2;
  201. { the last piece of this column }
  202. OCI_LAST_PIECE = 3;
  203. { input data types }
  204. { (ORANET TYPE) character string }
  205. const
  206. SQLT_CHR = 1;
  207. { (ORANET TYPE) oracle numeric }
  208. SQLT_NUM = 2;
  209. { (ORANET TYPE) integer }
  210. SQLT_INT = 3;
  211. { (ORANET TYPE) Floating point number }
  212. SQLT_FLT = 4;
  213. { zero terminated string }
  214. SQLT_STR = 5;
  215. { NUM with preceding length byte }
  216. SQLT_VNU = 6;
  217. { (ORANET TYPE) Packed Decimal Numeric }
  218. SQLT_PDN = 7;
  219. { long }
  220. SQLT_LNG = 8;
  221. { Variable character string }
  222. SQLT_VCS = 9;
  223. { Null/empty PCC Descriptor entry }
  224. SQLT_NON = 10;
  225. { rowid }
  226. SQLT_RID = 11;
  227. { date in oracle format }
  228. SQLT_DAT = 12;
  229. { binary in VCS format }
  230. SQLT_VBI = 15;
  231. { Native Binary float }
  232. SQLT_BFLOAT = 21;
  233. { NAtive binary double }
  234. SQLT_BDOUBLE = 22;
  235. { binary data(DTYBIN) }
  236. SQLT_BIN = 23;
  237. { long binary }
  238. SQLT_LBI = 24;
  239. { unsigned integer }
  240. SQLT_UIN = 68;
  241. { Display sign leading separate }
  242. SQLT_SLS = 91;
  243. { Longer longs (char) }
  244. SQLT_LVC = 94;
  245. { Longer long binary }
  246. SQLT_LVB = 95;
  247. { Ansi fixed char }
  248. SQLT_AFC = 96;
  249. { Ansi Var char }
  250. SQLT_AVC = 97;
  251. { binary float canonical }
  252. SQLT_IBFLOAT = 100;
  253. { binary double canonical }
  254. SQLT_IBDOUBLE = 101;
  255. { cursor type }
  256. SQLT_CUR = 102;
  257. { rowid descriptor }
  258. SQLT_RDD = 104;
  259. { label type }
  260. SQLT_LAB = 105;
  261. { oslabel type }
  262. SQLT_OSL = 106;
  263. { named object type }
  264. SQLT_NTY = 108;
  265. { ref type }
  266. SQLT_REF = 110;
  267. { character lob }
  268. SQLT_CLOB = 112;
  269. { binary lob }
  270. SQLT_BLOB = 113;
  271. { binary file lob }
  272. SQLT_BFILEE = 114;
  273. { character file lob }
  274. SQLT_CFILEE = 115;
  275. { result set type }
  276. SQLT_RSET = 116;
  277. { named collection type (varray or nested table) }
  278. SQLT_NCO = 122;
  279. { OCIString type }
  280. SQLT_VST = 155;
  281. { OCIDate type }
  282. SQLT_ODT = 156;
  283. { datetimes and intervals }
  284. { ANSI Date }
  285. SQLT_DATE = 184;
  286. { TIME }
  287. SQLT_TIME = 185;
  288. { TIME WITH TIME ZONE }
  289. SQLT_TIME_TZ = 186;
  290. { TIMESTAMP }
  291. SQLT_TIMESTAMP = 187;
  292. { TIMESTAMP WITH TIME ZONE }
  293. SQLT_TIMESTAMP_TZ = 188;
  294. { INTERVAL YEAR TO MONTH }
  295. SQLT_INTERVAL_YM = 189;
  296. { INTERVAL DAY TO SECOND }
  297. SQLT_INTERVAL_DS = 190;
  298. { TIMESTAMP WITH LOCAL TZ }
  299. SQLT_TIMESTAMP_LTZ = 232;
  300. { pl/sql representation of named types }
  301. SQLT_PNTY = 241;
  302. { cxcheng: this has been added for backward compatibility -
  303. it needs to be here because ocidfn.h can get included ahead of sqldef.h }
  304. { binary file lob }
  305. SQLT_FILE = SQLT_BFILEE;
  306. SQLT_CFILE = SQLT_CFILEE;
  307. SQLT_BFILE = SQLT_BFILEE;
  308. { CHAR/NCHAR/VARCHAR2/NVARCHAR2/CLOB/NCLOB char set "form" information }
  309. { for CHAR, VARCHAR2, CLOB w/o a specified set }
  310. SQLCS_IMPLICIT = 1;
  311. { for NCHAR, NCHAR VARYING, NCLOB }
  312. SQLCS_NCHAR = 2;
  313. { for CHAR, etc, with "CHARACTER SET ..." syntax }
  314. SQLCS_EXPLICIT = 3;
  315. { for PL/SQL "flexible" parameters }
  316. SQLCS_FLEXIBLE = 4;
  317. { for typecheck of NULL and empty_clob() lits }
  318. SQLCS_LIT_NULL = 5;