blob: f7bb786ca8d8fb0150dc68b371491d8a52cfa46c [file] [log] [blame]
Tang Cheng03c0b0a2015-01-12 11:19:45 +08001/*
2 *
3 */
4
5/* Copyright (c) 1991, 2005, Oracle. All rights reserved. */
6/* Copyright (c) 1991, 2005, Oracle. All rights reserved. */
7/*
8 NAME
9 ocidem.h - OCI demo header
10 MODIFIED (MM/DD/YY)
11 dmukhin 06/29/05 - ANSI prototypes; miscellaneous cleanup
12 whe 04/07/99 - bug#810071
13 whe 03/19/99 - lrg 32079 etc.: putting static back for oci_func_tab
14 nmacnaug 02/02/99 - static declarations should not be in header files
15 mygopala 09/22/97 - Fix for bug 550351
16 surman 03/14/97 - Merge 413362 to 8.0.3
17 surman 11/08/96 - 413362: Add SS_64BIT_SERVER macro
18 emendez 04/07/94 - merge changes from branch 1.6.710.1
19 emendez 02/02/94 - Fix for bug 157576
20 jnlee 01/05/93 - include oratypes.h once, make oci_func_tab static
21 rkooi2 10/26/92 - More portability mods
22 rkooi2 10/22/92 - Change text back to char to avoid casts
23 rkooi2 10/20/92 - Changes to make it portable
24 sjain 03/16/92 - Creation
25*/
26
27/*
28 * ocidem.h
29 *
30 * Declares additional functions and data structures
31 * used in the OCI C sample programs.
32 */
33
34
35#ifndef ORATYPES
36#include <oratypes.h>
37#endif /* ORATYPES */
38
39#ifndef OCIDFN
40#include <ocidfn.h>
41#endif /* OCIDFN */
42
43#ifndef OCIDEM
44#define OCIDEM
45
46
47/* internal/external datatype codes */
48#define VARCHAR2_TYPE 1
49#define NUMBER_TYPE 2
50#define INT_TYPE 3
51#define FLOAT_TYPE 4
52#define STRING_TYPE 5
53#define ROWID_TYPE 11
54#define DATE_TYPE 12
55
56/* ORACLE error codes used in demonstration programs */
57#define VAR_NOT_IN_LIST 1007
58#ifndef NO_DATA_FOUND
59# define NO_DATA_FOUND 1403
60#endif
61#define NULL_VALUE_RETURNED 1405
62
63/* some SQL and OCI function codes */
64#define FT_INSERT 3
65#define FT_SELECT 4
66#define FT_UPDATE 5
67#define FT_DELETE 9
68
69#define FC_OOPEN 14
70
71/*
72 * OCI function code labels,
73 * corresponding to the fc numbers
74 * in the cursor data area.
75 */
76static const text *oci_func_tab[] = {(text *) "not used",
77/* 1-2 */ (text *) "not used", (text *) "OSQL",
78/* 3-4 */ (text *) "not used", (text *) "OEXEC, OEXN",
79/* 5-6 */ (text *) "not used", (text *) "OBIND",
80/* 7-8 */ (text *) "not used", (text *) "ODEFIN",
81/* 9-10 */ (text *) "not used", (text *) "ODSRBN",
82/* 11-12 */ (text *) "not used", (text *) "OFETCH, OFEN",
83/* 13-14 */ (text *) "not used", (text *) "OOPEN",
84/* 15-16 */ (text *) "not used", (text *) "OCLOSE",
85/* 17-18 */ (text *) "not used", (text *) "not used",
86/* 19-20 */ (text *) "not used", (text *) "not used",
87/* 21-22 */ (text *) "not used", (text *) "ODSC",
88/* 23-24 */ (text *) "not used", (text *) "ONAME",
89/* 25-26 */ (text *) "not used", (text *) "OSQL3",
90/* 27-28 */ (text *) "not used", (text *) "OBNDRV",
91/* 29-30 */ (text *) "not used", (text *) "OBNDRN",
92/* 31-32 */ (text *) "not used", (text *) "not used",
93/* 33-34 */ (text *) "not used", (text *) "OOPT",
94/* 35-36 */ (text *) "not used", (text *) "not used",
95/* 37-38 */ (text *) "not used", (text *) "not used",
96/* 39-40 */ (text *) "not used", (text *) "not used",
97/* 41-42 */ (text *) "not used", (text *) "not used",
98/* 43-44 */ (text *) "not used", (text *) "not used",
99/* 45-46 */ (text *) "not used", (text *) "not used",
100/* 47-48 */ (text *) "not used", (text *) "not used",
101/* 49-50 */ (text *) "not used", (text *) "not used",
102/* 51-52 */ (text *) "not used", (text *) "OCAN",
103/* 53-54 */ (text *) "not used", (text *) "OPARSE",
104/* 55-56 */ (text *) "not used", (text *) "OEXFET",
105/* 57-58 */ (text *) "not used", (text *) "OFLNG",
106/* 59-60 */ (text *) "not used", (text *) "ODESCR",
107/* 61-62 */ (text *) "not used", (text *) "OBNDRA",
108/* 63-64 */ (text *) "OBINDPS", (text *) "ODEFINPS",
109/* 65-66 */ (text *) "OGETPI", (text *) "OSETPI"
110};
111
112#endif /* OCIDEM */
113