summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/oracle/src/ociap.inc
blob: df68a6d13b6d874d0e844157b924f9e2d2216d68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997

{
  Automatically converted by H2Pas 1.0.0 from ociap.h
  The following command line parameters were used:
    -p
    -D
    -l
    jojo.so
    ociap.h
}

  Type
//  Pboolean  = ^boolean;
//  Ppdvoid  = ^Pdvoid;

  PPub4 = ^Pub4;
  PPub2 = ^Pub2;
  
  size_t = ptrint;
  psize_t = ^ptrint;
{  PLda_Def  = ^Lda_Def;
  PnzttBufferBlock  = ^nzttBufferBlock;
  PnzttIdentity  = ^nzttIdentity;
  PnzttIdentityDesc  = ^nzttIdentityDesc;
  PnzttPersona  = ^nzttPersona;
  PnzttPersonaDesc  = ^nzttPersonaDesc;
  PnzttProtInfo  = ^nzttProtInfo;
  Pnztttdufmt  = ^nztttdufmt;
  PnzttWallet  = ^nzttWallet;
  POCIAdmin  = ^OCIAdmin;
  POCIAnyData  = ^OCIAnyData;
  POCIAnyDataSet  = ^OCIAnyDataSet;
  POCIAQAgent  = ^OCIAQAgent;
  POCIAQDeqOptions  = ^OCIAQDeqOptions;
  POCIAQEnqOptions  = ^OCIAQEnqOptions;
  POCIAQLisMsgProps  = ^OCIAQLisMsgProps;
  POCIAQListenOpts  = ^OCIAQListenOpts;
  POCIAQMsgProperties  = ^OCIAQMsgProperties;
  POCIAuthInfo  = ^OCIAuthInfo;
  POCIBind  = ^OCIBind;
  POCICPool  = ^OCICPool;
  POCIDateTime  = ^OCIDateTime;
  POCIDefine  = ^OCIDefine;
  POCIDescribe  = ^OCIDescribe;
  POCIEnv  = ^OCIEnv;
  POCIError  = ^OCIError;
  POCIEvent  = ^OCIEvent;
  POCIFileObject  = ^OCIFileObject;
  POCIFocbkStruct  = ^OCIFocbkStruct;
  POCIInd  = ^OCIInd;
  POCIInterval  = ^OCIInterval;
  POCILobLocator  = ^OCILobLocator;
  POCIMsg  = ^OCIMsg;
  POCINumber  = ^OCINumber;
  POCIPicklerFdo  = ^OCIPicklerFdo;
  POCIPicklerImage  = ^OCIPicklerImage;
  POCIPicklerTds  = ^OCIPicklerTds;
  POCIPicklerTdsCtx  = ^OCIPicklerTdsCtx;
//  POCIPicklerTdsElement  = ^OCIPicklerTdsElement;
  POCIRaw  = ^OCIRaw;
  POCIResult  = ^OCIResult;
  POCIRowid  = ^OCIRowid;
  POCISecurity  = ^OCISecurity;
  POCIServer  = ^OCIServer;
  POCISession  = ^OCISession;
  POCISnapshot  = ^OCISnapshot;
  POCISPool  = ^OCISPool;
  POCIStmt  = ^OCIStmt;
  POCISubscription  = ^OCISubscription;
  POCISvcCtx  = ^OCISvcCtx;
  POCIThreadHandle  = ^OCIThreadHandle;
  POCIThreadId  = ^OCIThreadId;
  POCIThreadKey  = ^OCIThreadKey;
  POCIThreadMutex  = ^OCIThreadMutex;
  POCITrans  = ^OCITrans;
  POCIType  = ^OCIType;
  POCITypeCode  = ^OCITypeCode;
  POCIUcb  = ^OCIUcb;
  POCIUserCallback  = ^OCIUserCallback;
//  POCIWchar  = ^OCIWchar;
  POraText  = ^OraText;
  Poraub8  = ^oraub8;
  Psb1  = ^sb1;
  Psb2  = ^sb2;
  Psb4  = ^sb4;
  Psbig_ora  = ^sbig_ora;
  Psize_t  = ^size_t;
  Psword  = ^sword;
  Ptext  = ^text;
  Pub1  = ^ub1;
  Pub2  = ^ub2;
  Pub4  = ^ub4;
  Pubig_ora  = ^ubig_ora;
  Puword  = ^uword;
}

{$PACKRECORDS C}

  {
   * $Header: ociap.h 11-aug-2004.18:52:42 rvissapr Exp $
    }
  { Copyright (c) 1996, 2004, Oracle. All rights reserved.   }
  { NOTE:  See 'header_template.doc' in the 'doc' dve under the 'forms' 
        directory for the header file template that includes instructions. 
   }
  { 
     NAME 
       ociap.h - Oracle Call Interface - Ansi Prototypes
  
     DESCRIPTION 
       <short description of component this file declares/defines> 
  
     RELATED DOCUMENTS 
   
     INSPECTION STATUS 
       Inspection date: 
       Inspection status: 
       Estimated increasing cost defects per page: 
       Rule sets: 
   
     ACCEPTANCE REVIEW STATUS 
       Review date: 
       Review status: 
       Reviewers: 
   
     PUBLIC FUNCTION(S) 
       <list of external functions declared/defined - with one-line descriptions>
  
     PRIVATE FUNCTION(S)
       <list of static functions defined in .c file - with one-line descriptions>
  
     EXAMPLES
  
     NOTES
       <other useful comments, qualifications, etc.>
  
     MODIFIED   (MM/DD/YY)
  
      nbhatt   06/17/04 - merge conflicts 
      nbhatt   05/24/04 - merge conflicts 
     weiwang     05/06/04 - add OCIAQListen2 
     rvissapr    06/21/04 - add OCIAppCtx API 
     debanerj    05/17/04 - 13064: LOB array Read and Write
     aahluwal    06/02/04 - [OCI Events]: add OCIInitEventHandle
     nikeda      05/28/04 - grabtrans 'nikeda_oci_events_copy' 
     nikeda      05/13/04 - [OCI Events] Rename HACBK->EVTCBK, HACTX->EVTCTX 
     nikeda      05/10/04 - [OCI Events] code review changes 
     aahluwal    04/09/04 - [OCI Events]: add OCIHAServerHandleGet
     nikeda      03/18/04 - [OCI Events] New Server Handle Callback 
     dfrumkin    12/04/03 - Add OCIDBStartup, OCIDBShutdown 
     jciminsk    12/12/03 - merge from RDBMS_MAIN_SOLARIS_031209 
     sgollapu    06/26/03 - Change OCIPing prototype
     sgollapu    05/05/03 - Add OCIPing
     debanerj    01/16/03 - Bug 2753018: Lob Locator parameter for 
                            OCILobGetStorageLimit
     rpingte     05/06/04 - add OCIClientVersion
     debanerj    08/26/03 - 6003: Lob interface changes
     sgollapu    06/23/03 - Add OCIPing
     debanerj    01/16/03 - Bug 2753018: Lob Locator parameter for 
                            OCILobGetStorageLimit
     tkeefe      02/17/03 - bug-2773794: Add new interface for setting Kerb attrs
     ataracha    01/03/03 - Move OCIXMLType functions to ocixml.h
     akatti      11/28/02 - [2521361]:add OCIRowidToChar prototype
     chliang     10/23/02 - add OCIFetchRowCallback
     cparampa    10/13/02 - Fix the prototype of OCIAQListen(ansi prototype)
     chliang     10/12/02 - add OCIBindRowCallback
     debanerj    09/30/02 - Unlimited size LOB 6003
     thoang      09/25/02 - Add csid to XMLType create functions
     thoang      04/19/02 - Add OCIXMLTypeGetNS
     aahluwal    08/09/02 - adding OCIAQDeqArray
     aahluwal    06/03/02 - bug 2360115
     skabraha    04/16/02 - fix compiler warnings
     sichandr    02/12/02 - fix OCIXMLTypeExists
     gayyappa    02/01/02 - fix 2210776 : change Dom to DOM 
     sichandr    10/24/01 - OCISvcCtx for XMLType create routines
     schandir    09/14/01 - Add prototypes for Stmt Caching
     abande      09/04/01 - Add Prototypes for Session Pooling Methods
     stakeda     09/12/01 - add OCINlsCharSetConvert
     whe         08/28/01 - add OCIEnvNlsCreate
     wzhang      08/22/01 - Add OCINlsCharSetNameToId.
     whe         10/05/01 - add prototype for OCIXMLType functions
     mdmehta     04/06/01 - Bug 1683763, OCIDateTimeToText: buf_size to ub4*
     schandir    12/12/00 - modify the ociconnectionpoolcreate() interface.
     porangas    12/04/00 - Forward merge bug#974710 to 9i
     rpingte     11/29/00 - Fix bug# 1485795.
     gtarora     11/30/00 - fix comment for OCILobIsTemporary
     akatti      11/07/00 - [1198379]:add OCIRowidToChar
     bpalaval    10/15/00 - Forward merge 892654.
     kmohan      09/18/00 - add OCILogon2
     etucker     07/28/00 - add OCIIntervalFromTZ
     vjayaram    07/18/00 - add connection pooling changes
     etucker     07/13/00 - add dls apis for oci
     hmasaki     07/05/00 - fix 1230846: forward merge into 8.2
     mbastawa    06/05/00 - add OCIStmtFetch2
     rxgovind    06/07/00 - update OCIAnyData interfaces
     rxgovind    05/04/00 - add OCIAnyDataSet interfaces
     rkasamse    05/01/00 - remove attrno from OCIAnyDataAttrGet
     rkasamse    03/13/00 - add prototype s for OCCIAnyData
     slari       09/01/99 - remove OCIEnvCallback
     slari       08/23/99 - add OCIUcb in user callback functions
     dsaha       07/07/99 - Add OCIFEnvCreate for forms
     vyanaman    06/21/99 - Change OCI DateTime/Interval APIs.
     esoyleme    07/01/99 - expose MTS performance enhancements                  
     whe         06/14/99 - bug727872:add CONST to match definitions
     kkarun      02/23/99 - Fix OCIDateTime APIs
     jiyang      12/07/98 - Add comments for OCI_NLS_DUAL_CURRENCY
     aroy        12/01/98 - add OCIEnvCreate
     slari       11/23/98 - use ORASTDARG
     slari       11/21/98 - replace ellipsis by arglist in OCIUserCallback
     thchang     10/20/98 - correct comment on OCILobCreateTemporary
     slari       09/08/98 - allow envh to receive error info also in CallbackReg/
     kkarun      09/02/98 - Change const to CONST
     aroy        08/04/98 - add OCITerminate calls                               
     nramakri    06/25/98 - remove CONST from some OCIPickler APIs
     jiyang      06/22/98 - Fix a lint error
     nmallava    06/08/98 - ociistemporary -> envhp
     jhasenbe    05/27/98 - Remove definitions for U-Calls (Unicode)
     nmallava    05/18/98 - add comments
     sgollapu    05/19/98 - Change text to OraText
     aroy        04/20/98 - merge forward 8.0.5 -> 8.1.3
     nbhatt      05/14/98 -  aq listen call
     lchidamb    03/02/98 - Client Notification prototypes
     vyanaman    04/19/98 - System Timestamp
     kkarun      04/17/98 - Add more Interval functions
     vyanaman    04/17/98 - Fix min (proc error)
     vyanaman    04/16/98 - Add get/set TZ
     kkarun      04/13/98 - Add Datetime prototypes
     rkasamse    04/13/98 - change OCIEnv* to dvoid* for context/memory cart serv
     rkasamse    04/15/98 - chage pickler cart interface
     slari       03/20/98 - change proto of OCIUserCallback
     slari       02/17/98 - add OCIUserCallback
     jiyang      04/02/98 - Accept both env and user handles for NLS
     rkasamse    03/20/98 - remove prototypes for OCIMemoryDuration* functions.
     tsaulys     03/20/98 - use environment or session handle
     nmallava    04/09/98 - OCILobLocatorAssign
     nmallava    04/07/98 - lobgetchunksize and writeappend apis
     jhasenbe    04/06/98 - Add new interfaces for Unicode support
     nmallava    03/17/98 - add interfaces
     nmallava    03/16/98 - add open/close apis
     nmallava    03/10/98 - add temporary lobs apis
     sgollapu    07/10/97 - Add OCIReset
     sgollapu    02/09/98 - OCI non-blocking
     nramakri    01/16/98 - remove #ifdef NEVER clause for OCIExtract
     rmurthy     01/08/98 - OCIContextGenerateKey: change ub1 to ub4
     ewaugh      12/18/97 - Turn type wrappers into functions.
     skabraha    12/02/97 - adding OCIFile functions
     rhwu        12/02/97 - add OCI Thread
     nramakri    12/15/97 - move to core4
     nramakri    12/11/97 - modify OCIExtract prototype
     ewaugh      12/10/97 - add OCIFormat prototypes
     nmallava    12/17/97 - Add ilob open and close apis
     rkasamse    12/03/97 - Change some of the function names for pickler cartrid
     nramakri    11/12/97 - add OCIExtract prototypes
     rkasamse    11/21/97 - add prototypes for memory cartridge services and cont
     rkasamse    11/03/97 - Add pickler cartridge interfaces.
     jiyang      11/11/97 - Add NLS service for cartridge
     tanguyen    08/19/97 -
     cxcheng     07/30/97 - replace OCISvcCtx with OCISvcCtx
     schandra    06/25/97 - AQ OCI interface
     bnainani    07/21/97 - add prototypes for Oracle XA extensions
     esoyleme    05/13/97 - move failover callback prototype
     skmishra    05/06/97 - stdc compiler fixes
     skmishra    04/24/97 - C++ Compatibility changes
     skotsovo    04/21/97 - make lob parameter names consistent
     rwhitman    04/16/97 - Fix LOB prototypes - Olint OCI 8.0.3
     ramkrish    04/15/97 - Add free flag to OCILobFlushBuffer
     dchatter    04/10/97 - add nzt.h inclusion
     cxcheng     04/09/97 - change objnamp from CONST text* to dvoid*
     cxcheng     04/08/97 - fix prototype of OCIDescribeAny()
     skotsovo    03/31/97 - remove OCILobLocatorSize
     skotsovo    03/27/97 - add OCILobLoadFromFile
     bcchang     02/18/97 - Fix syntax error
     dchatter    01/13/97 - fix comments on LOB calls
     aroy        01/10/97 - remove ocilobfilecreate delete
     sgollapu    12/27/96 - Correct OCILogon prototype
     dchatter    01/04/97 - comments to describe the functions
     sgollapu    11/25/96 - Change OCILobFileIsExistent
     schandra    11/18/96 - Remove xa.h include
     sgollapu    11/09/96 - Change prototype of OCIDescribeAny
     dchatter    10/31/96 - delete CONST from lob write cb fn
     dchatter    10/30/96 - more changes
     dchatter    10/26/96 - lob/file long name corrections
     slari       10/16/96 - delete unused calls
     rwessman    10/29/96 - Fixed OCISecurityGetIdentity prototype
     bcchang     10/25/96 - Fix syntax error
     sgollapu    10/22/96 - Add OCILogon and OCILogoff
     rwessman    10/16/96 - Added cryptographic and digital signature functions
     sgollapu    10/10/96 - Add ocibdp and ocibdn
     rxgovind    10/07/96 - add oci file calls
     skotsovo    10/01/96 - move orl lob fnts to oci
     skotsovo    09/20/96 - in OCILobGetLength(), remove the 'isnull' parameter.
     aroy        08/29/96 - change prototype for Nchar Lob support
     dchatter    08/21/96 - OCIResultSetToStmt prototype change
     sthakur     08/14/96 - add OCIParamSet
     schandra    07/26/96 - TX OCI return values - sb4->sword
     aroy        07/17/96 - terminology change: OCILobLocator => OCILobLocator
     dchatter    07/01/96 - create ANSI prototypes
     dchatter    07/01/96 - Creation
  
   }
{$ifndef OCIAP_ORACLE}
{$define OCIAP_ORACLE}  
{$ifndef ORASTDARG}
{ $include <stdarg.h>}
{$define ORASTDARG}  
{$endif}
{$ifndef OCIDFN}
{ $include <ocidfn.h>}
{$endif}
{$include nzt.inc}
  { NZT_ORACLE  }
{$ifndef ORT_ORACLE}
{ $include <ort.h>}
{$endif}
  {---------------------------------------------------------------------------
                       PUBLIC TYPES AND CONSTANTS
    --------------------------------------------------------------------------- }
  {---------------------------------------------------------------------------
                       PRIVATE TYPES AND CONSTANTS
    --------------------------------------------------------------------------- }
  {---------------------------------------------------------------------------
                             PUBLIC FUNCTIONS
    --------------------------------------------------------------------------- }
  {****************************************************************************
                                DESCRIPTION
  ******************************************************************************
  Note: the descriptions of the functions are alphabetically arranged. Please 
  maintain the arrangement when adding a new function description. The actual 
  prototypes are below this comment section and donot follow any alphabetical 
  ordering. 
  
  
  --------------------------------OCIAttrGet------------------------------------
  
  OCIAttrGet()
  Name
  OCI Attribute Get
  Purpose
  This call is used to get a particular attribute of a handle. 
  Syntax
  sword OCIAttrGet ( CONST dvoid    *trgthndlp,
                   ub4            trghndltyp,
                   dvoid          *attributep,
                   ub4            *sizep,
                   ub4            attrtype,
                   OCIError       *errhp );
  Comments
  This call is used to get a particular attribute of a handle.
  See Appendix B,  "Handle Attributes",  for a list of handle types and their 
  readable attributes.
  Parameters
  trgthndlp (IN) - is the pointer to a handle type. 
  trghndltyp (IN) - is the handle type. 
  attributep (OUT) - is a pointer to the storage for an attribute value. The 
  attribute value is filled in. 
  sizep (OUT) - is the size of the attribute value. 
  This can be passed in as NULL for most parameters as the size is well known. 
  For text* parameters, a pointer to a ub4 must be passed in to get the length 
  of the string. 
  attrtype (IN) - is the type of attribute.
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  Related Functions
  OCIAttrSet()
  
  --------------------------------OCIAttrSet------------------------------------
  
  
  OCIAttrSet()
  Name
  OCI Attribute Set
  Purpose
  This call is used to set a particular attribute of a handle or a descriptor. 
  Syntax
  sword OCIAttrSet ( dvoid       *trgthndlp,
                   ub4         trghndltyp,
                   dvoid       *attributep,
                   ub4         size,
                   ub4         attrtype,
                   OCIError    *errhp );
  Comments
  This call is used to set a particular attribute of a handle or a descriptor. 
  See Appendix B for a list of handle types and their writeable attributes.
  Parameters
  trghndlp (IN/OUT) - the pointer to a handle type whose attribute gets 
  modified. 
  trghndltyp (IN/OUT) - is the handle type. 
  attributep (IN) - a pointer to an attribute value. 
  The attribute value is copied into the target handle. If the attribute value 
  is a pointer, then only the pointer is copied, not the contents of the pointer.
  size (IN) - is the size of an attribute value. This can be passed in as 0 for 
  most attributes as the size is already known by the OCI library. For text*
  attributes, a ub4 must be passed in set to the length of the string. 
  attrtype (IN) - the type of attribute being set.
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error. 
  Related Functions
  OCIAttrGet()
  
  
  
  --------------------------------OCIBindArrayOfStruct--------------------------
  
  
  
  OCIBindArrayOfStruct()
  Name
  OCI Bind for Array of Structures
  Purpose
  This call sets up the skip parameters for a static array bind.
  Syntax
  sword OCIBindArrayOfStruct ( OCIBind     *bindp,
                             OCIError    *errhp,
                             ub4         pvskip, 
                             ub4         indskip, 
                             ub4         alskip, 
                             ub4         rcskip );
  Comments
  This call sets up the skip parameters necessary for a static array bind.
  This call follows a call to OCIBindByName() or OCIBindByPos(). The bind 
  handle returned by that initial bind call is used as a parameter for the 
  OCIBindArrayOfStruct() call.
  For information about skip parameters, see the section "Arrays of Structures" 
  on page 4-16.
  Parameters
  bindp (IN) - the handle to a bind structure. 
  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  pvskip (IN) - skip parameter for the next data value. 
  indskip (IN) - skip parameter for the next indicator value or structure. 
  alskip (IN) - skip parameter for the next actual length value. 
  rcskip (IN) - skip parameter for the next column-level return code value. 
  Related Functions
  OCIAttrGet()
  
  
  --------------------------------OCIBindByName---------------------------------
  
  OCIBindByName()
  Name
  OCI Bind by Name
  Purpose
  Creates an association between a program variable and a placeholder in a SQL 
  statement or PL/SQL block.
  Syntax
  sword OCIBindByName (
                OCIStmt       *stmtp, 
                OCIBind       **bindp,
                OCIError      *errhp,
                CONST OraText    *placeholder,
                sb4           placeh_len,
                dvoid         *valuep,
                sb4           value_sz,
                ub2           dty,
                dvoid         *indp,
                ub2           *alenp,
                ub2           *rcodep,
                ub4           maxarr_len,
                ub4           *curelep, 
                ub4           mode ); 
  Description
  This call is used to perform a basic bind operation. The bind creates an 
  association between the address of a program variable and a placeholder in a 
  SQL statement or PL/SQL block. The bind call also specifies the type of data 
  which is being bound, and may also indicate the method by which data will be 
  provided at runtime.
  This function also implicitly allocates the bind handle indicated by the bindp 
  parameter.
  Data in an OCI application can be bound to placeholders statically or 
  dynamically. Binding is static when all the IN bind data and the OUT bind 
  buffers are well-defined just before the execute. Binding is dynamic when the 
  IN bind data and the OUT bind buffers are provided by the application on 
  demand at execute time to the client library. Dynamic binding is indicated by 
  setting the mode parameter of this call to OCI_DATA_AT_EXEC.
  Related Functions: For more information about dynamic binding, see 
  the section "Runtime Data Allocation and Piecewise Operations" on 
  page 5-16.
  Both OCIBindByName() and OCIBindByPos() take as a parameter a bind handle, 
  which is implicitly allocated by the bind call A separate bind handle is 
  allocated for each placeholder the application is binding.
  Additional bind calls may be required to specify particular attributes 
  necessary when binding certain data types or handling input data in certain 
  ways:
  If arrays of structures are being utilized, OCIBindArrayOfStruct() must 
  be called to set up the necessary skip parameters.
  If data is being provided dynamically at runtime, and the application 
  will be using user-defined callback functions, OCIBindDynamic() must 
  be called to register the callbacks.
  If a named data type is being bound, OCIBindObject() must be called to 
  specify additional necessary information.
  Parameters
  stmth (IN/OUT) - the statement handle to the SQL or PL/SQL statement 
  being processed.
  bindp (IN/OUT) - a pointer to a pointer to a bind handle which is implicitly 
  allocated by this call.  The bind handle  maintains all the bind information 
  for this particular input value. The handle is feed implicitly when the 
  statement handle is deallocated.
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error. 
  placeholder (IN) - the placeholder attributes are specified by name if 
  ocibindn() is being called.
  placeh_len (IN) - the length of the placeholder name specified in placeholder.
  valuep (IN/OUT) - a pointer to a data value or an array of data values of the 
  type specified in the dty parameter. An array of data values can be specified 
  for mapping into a PL/SQL table or for providing data for SQL multiple-row 
  operations. When an array of bind values is provided, this is called an array 
  bind in OCI terms. Additional attributes of the array bind (not bind to a 
  column of ARRAY type) are set up in OCIBindArrayOfStruct() call. 
  For a REF, named data type  bind, the valuep parameter is used only for IN 
  bind data. The pointers to OUT buffers are set in the pgvpp parameter 
  initialized by OCIBindObject(). For named data type and REF binds, the bind 
  values are unpickled into the Object Cache. The OCI object navigational calls 
  can then be used to navigate the objects and the refs in the Object Cache.
  If the OCI_DATA_AT_EXEC mode is specified in the mode parameter, valuep 
  is ignored for all data types. OCIBindArrayOfStruct() cannot be used and 
  OCIBindDynamic() must be invoked to provide callback functions if desired. 
  value_sz (IN) - the size of a data value. In the case of an array bind, this is
  the maximum size of any element possible with the actual sizes being specified 
  in the alenp parameter. 
  If the OCI_DATA_AT_EXEC mode is specified, valuesz defines the maximum 
  size of the data that can be ever provided at runtime for data types other than
  named data types or REFs. 
  dty (IN) - the data type of the value(s) being bound. Named data types 
  (SQLT_NTY) and REFs (SQLT_REF) are valid only if the application has been 
  initialized in object mode. For named data types, or REFs, additional calls 
  must be made with the bind handle to set up the datatype-specific attributes.
  indp (IN/OUT) - pointer to an indicator variable or array. For scalar data 
  types, this is a pointer to sb2 or an array of sb2s. For named data types, 
  this pointer is ignored and the actual pointer to the indicator structure or 
  an array of indicator structures is initialized by OCIBindObject(). 
  Ignored for dynamic binds.
  See the section "Indicator Variables" on page 2-43 for more information about 
  indicator variables.
  alenp (IN/OUT) - pointer to array of actual lengths of array elements. Each 
  element in alenp is the length of the data in the corresponding element in the 
  bind value array before and after the execute. This parameter is ignored for 
  dynamic binds.
  rcodep (OUT) - pointer to array of column level return codes. This parameter 
  is ignored for dynamic binds.
  maxarr_len (IN) - the maximum possible number of elements of type dty in a 
  PL/SQL binds. This parameter is not required for non-PL/SQL binds. If 
  maxarr_len is non-zero, then either OCIBindDynamic() or 
  OCIBindArrayOfStruct() can be invoked to set up additional bind attributes. 
  curelep(IN/OUT) - a pointer to the actual number of elements. This parameter 
  is only required for PL/SQL binds.
  mode (IN) - the valid modes for this parameter are:
  OCI_DEFAULT. This is default mode.
  OCI_DATA_AT_EXEC. When this mode is selected, the value_sz 
  parameter defines the maximum size of the data that can be ever 
  provided at runtime. The application must be ready to provide the OCI 
  library runtime IN data buffers at any time and any number of times. 
  Runtime data is provided in one of the two ways:
  callbacks using a user-defined function which must be registered 
  with a subsequent call to OCIBindDynamic(). 
  a polling mechanism using calls supplied by the OCI. This mode 
  is assumed if no callbacks are defined.
  For more information about using the OCI_DATA_AT_EXEC mode, see 
  the section "Runtime Data Allocation and Piecewise Operations" on 
  page 5-16.
  When the allocated buffers are not required any more, they should be 
  freed by the client. 
  Related Functions
  OCIBindDynamic(), OCIBindObject(), OCIBindArrayOfStruct(), OCIAttrGet()
  
  
  
  -------------------------------OCIBindByPos-----------------------------------
  
  
  OCIBindByPos()
  Name
  OCI Bind by Position
  Purpose
  Creates an association between a program variable and a placeholder in a SQL 
  statement or PL/SQL block.
  Syntax
  sword OCIBindByPos ( 
                OCIStmt      *stmtp, 
                OCIBind      **bindp,
                OCIError     *errhp,
                ub4          position,
                dvoid        *valuep,
                sb4          value_sz,
                ub2          dty,
                dvoid        *indp,
                ub2          *alenp,
                ub2          *rcodep,
                ub4          maxarr_len,
                ub4          *curelep, 
                ub4          mode);
  
  Description
  This call is used to perform a basic bind operation. The bind creates an 
  association between the address of a program variable and a placeholder in a 
  SQL statement or PL/SQL block. The bind call also specifies the type of data 
  which is being bound, and may also indicate the method by which data will be 
  provided at runtime.
  This function also implicitly allocates the bind handle indicated by the bindp 
  parameter.
  Data in an OCI application can be bound to placeholders statically or 
  dynamically. Binding is static when all the IN bind data and the OUT bind 
  buffers are well-defined just before the execute. Binding is dynamic when the 
  IN bind data and the OUT bind buffers are provided by the application on 
  demand at execute time to the client library. Dynamic binding is indicated by 
  setting the mode parameter of this call to OCI_DATA_AT_EXEC.
  Related Functions: For more information about dynamic binding, see 
  the section "Runtime Data Allocation and Piecewise Operations" on 
  page 5-16
  Both OCIBindByName() and OCIBindByPos() take as a parameter a bind handle, 
  which is implicitly allocated by the bind call A separate bind handle is 
  allocated for each placeholder the application is binding.
  Additional bind calls may be required to specify particular attributes 
  necessary when binding certain data types or handling input data in certain 
  ways:
  If arrays of structures are being utilized, OCIBindArrayOfStruct() must 
  be called to set up the necessary skip parameters.
  If data is being provided dynamically at runtime, and the application 
  will be using user-defined callback functions, OCIBindDynamic() must 
  be called to register the callbacks.
  If a named data type is being bound, OCIBindObject() must be called to 
  specify additional necessary information.
  Parameters
  stmth (IN/OUT) - the statement handle to the SQL or PL/SQL statement 
  being processed.
  bindp (IN/OUT) - a pointer to a pointer to a bind handle which is implicitly 
  allocated by this call.  The bind handle  maintains all the bind information 
  for this particular input value. The handle is feed implicitly when the 
  statement handle is deallocated.
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error. 
  position (IN) - the placeholder attributes are specified by position if 
  ocibindp() is being called.
  valuep (IN/OUT) - a pointer to a data value or an array of data values of the 
  type specified in the dty parameter. An array of data values can be specified 
  for mapping into a PL/SQL table or for providing data for SQL multiple-row 
  operations. When an array of bind values is provided, this is called an array 
  bind in OCI terms. Additional attributes of the array bind (not bind to a 
  column of ARRAY type) are set up in OCIBindArrayOfStruct() call. 
  For a REF, named data type  bind, the valuep parameter is used only for IN 
  bind data. The pointers to OUT buffers are set in the pgvpp parameter 
  initialized by OCIBindObject(). For named data type and REF binds, the bind 
  values are unpickled into the Object Cache. The OCI object navigational calls 
  can then be used to navigate the objects and the refs in the Object Cache.
  If the OCI_DATA_AT_EXEC mode is specified in the mode parameter, valuep 
  is ignored for all data types. OCIBindArrayOfStruct() cannot be used and 
  OCIBindDynamic() must be invoked to provide callback functions if desired. 
  value_sz (IN) - the size of a data value. In the case of an array bind, this is
  the maximum size of any element possible with the actual sizes being specified
  in the alenp parameter. 
  If the OCI_DATA_AT_EXEC mode is specified, valuesz defines the maximum 
  size of the data that can be ever provided at runtime for data types other than
  named data types or REFs. 
  dty (IN) - the data type of the value(s) being bound. Named data types 
  (SQLT_NTY) and REFs (SQLT_REF) are valid only if the application has been 
  initialized in object mode. For named data types, or REFs, additional calls 
  must be made with the bind handle to set up the datatype-specific attributes.
  indp (IN/OUT) - pointer to an indicator variable or array. For scalar data 
  types, this is a pointer to sb2 or an array of sb2s. For named data types, 
  this pointer is ignored and the actual pointer to the indicator structure or 
  an array of indicator structures is initialized by OCIBindObject(). Ignored 
  for dynamic binds.
  See the section "Indicator Variables" on page 2-43 for more information about 
  indicator variables.
  alenp (IN/OUT) - pointer to array of actual lengths of array elements. Each 
  element in alenp is the length of the data in the corresponding element in the 
  bind value array before and after the execute. This parameter is ignored for 
  dynamic binds.
  rcodep (OUT) - pointer to array of column level return codes. This parameter 
  is ignored for dynamic binds.
  maxarr_len (IN) - the maximum possible number of elements of type dty in a 
  PL/SQL binds. This parameter is not required for non-PL/SQL binds. If 
  maxarr_len is non-zero, then either OCIBindDynamic() or 
  OCIBindArrayOfStruct() can be invoked to set up additional bind attributes. 
  curelep(IN/OUT) - a pointer to the actual number of elements. This parameter 
  is only required for PL/SQL binds.
  mode (IN) - the valid modes for this parameter are:
  OCI_DEFAULT. This is default mode.
  OCI_DATA_AT_EXEC. When this mode is selected, the value_sz 
  parameter defines the maximum size of the data that can be ever 
  provided at runtime. The application must be ready to provide the OCI 
  library runtime IN data buffers at any time and any number of times. 
  Runtime data is provided in one of the two ways:
  callbacks using a user-defined function which must be registered 
  with a subsequent call to OCIBindDynamic() . 
  a polling mechanism using calls supplied by the OCI. This mode 
  is assumed if no callbacks are defined.
  For more information about using the OCI_DATA_AT_EXEC mode, see 
  the section "Runtime Data Allocation and Piecewise Operations" on 
  page 5-16.
  When the allocated buffers are not required any more, they should be 
  freed by the client. 
  Related Functions
  OCIBindDynamic(), OCIBindObject(), OCIBindArrayOfStruct(), OCIAttrGet()
  
  
  
  -------------------------------OCIBindDynamic---------------------------------
  
  OCIBindDynamic()
  Name
  OCI Bind Dynamic Attributes
  Purpose
  This call is used to register user callbacks for dynamic data allocation. 
  Syntax
  sword OCIBindDynamic( OCIBind     *bindp,
                      OCIError    *errhp,
                      dvoid       *ictxp, 
                      OCICallbackInBind         (icbfp)(
                                  dvoid            *ictxp,
                                  OCIBind          *bindp,
                                  ub4              iter, 
                                  ub4              index, 
                                  dvoid            **bufpp,
                                  ub4              *alenp,
                                  ub1              *piecep, 
                                  dvoid            **indp ),
                      dvoid       *octxp,
                      OCICallbackOutBind         (ocbfp)(
                                  dvoid            *octxp,
                                  OCIBind          *bindp,
                                  ub4              iter, 
                                  ub4              index, 
                                  dvoid            **bufp, 
                                  ub4              **alenpp,
                                  ub1              *piecep,
                                  dvoid            **indpp, 
                                  ub2              **rcodepp)   );
  Comments
  This call is used to register user-defined callback functions for providing 
  data for an UPDATE or INSERT if OCI_DATA_AT_EXEC mode was specified in a 
  previous call to OCIBindByName() or OCIBindByPos(). 
  The callback function pointers must return OCI_CONTINUE if it the call is 
  successful. Any return code other than OCI_CONTINUE signals that the client 
  wishes to abort processing immediately.
  For more information about the OCI_DATA_AT_EXEC mode, see the section 
  "Runtime Data Allocation and Piecewise Operations" on page 5-16.
  Parameters
  bindp (IN/OUT) - a bind handle returned by a call to OCIBindByName() or 
  OCIBindByPos(). 
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error. 
  ictxp (IN) - the context pointer required by the call back function icbfp. 
  icbfp (IN) - the callback function which returns a pointer to the IN bind 
  value or piece at run time. The callback takes in the following parameters. 
  ictxp (IN/OUT) - the context pointer for this callback function. 
  bindp (IN) - the bind handle passed in to uniquely identify this bind 
  variable. 
  iter (IN) - 1-based execute iteration value. 
  index (IN) - index of the current array, for an array bind. 1 based not 
  greater than curele parameter of the bind call. 
  index (IN) - index of the current array, for an array bind. This parameter 
  is 1-based, and may not be greater than curele parameter of the bind call. 
  bufpp (OUT) - the pointer to the buffer. 
  piecep (OUT) - which piece of the bind value. This can be one of the 
  following values - OCI_ONE_PIECE, OCI_FIRST_PIECE, 
  OCI_NEXT_PIECE and OCI_LAST_PIECE.
  indp (OUT) - contains the indicator value. This is apointer to either an 
  sb2 value or a pointer to an indicator structure for binding named data 
  types. 
  indszp (OUT) - contains the indicator value size. A pointer containing 
  the size of either an sb2 or an indicator structure pointer. 
  octxp (IN) - the context pointer required by the callback function ocbfp. 
  ocbfp (IN) - the callback function which returns a pointer to the OUT bind 
  value or piece at run time. The callback takes in the following parameters. 
  octxp (IN/OUT) - the context pointer for this call back function. 
  bindp (IN) - the bind handle passed in to uniquely identify this bind 
  variable. 
  iter (IN) - 1-based execute iteration value. 
  index (IN) - index of the current array, for an array bind. This parameter 
  is 1-based, and must not be greater than curele parameter of the bind call. 
  bufpp (OUT) - a pointer to a buffer to write the bind value/piece. 
  buflp (OUT) - returns the buffer size. 
  alenpp (OUT) - a pointer to a storage for OCI to fill in the size of the bind 
  value/piece after it has been read. 
  piecep (IN/OUT) - which piece of the bind value. It will be set by the 
  library to be one of the following values - OCI_ONE_PIECE or 
  OCI_NEXT_PIECE. The callback function can leave it unchanged or set 
  it to OCI_FIRST_PIECE or OCI_LAST_PIECE. By default - 
  OCI_ONE_PIECE. 
  indpp (OUT) - returns a pointer to contain the indicator value which 
  either an sb2 value or a pointer to an indicator structure for named data 
  types. 
  indszpp (OUT) - returns a pointer to return the size of the indicator 
  value which is either size of an sb2 or size of an indicator structure. 
  rcodepp (OUT) - returns a pointer to contains the return code. 
  Related Functions
  OCIAttrGet()
  
  
  ---------------------------------OCIBindObject--------------------------------
  
  
  OCIBindObject()
  Name
  OCI Bind Object
  Purpose
  This function sets up additional attributes which are required for a named 
  data type (object)  bind.
  Syntax
  sword OCIBindObject ( OCIBind          *bindp,
                      OCIError         *errhp, 
                      CONST OCIType    *type,
                      dvoid            **pgvpp, 
                      ub4              *pvszsp, 
                      dvoid            **indpp, 
                      ub4              *indszp, );
  Comments
  This function sets up additional attributes which binding a named data type 
  or a REF. An error will be returned if this function is called when the OCI 
  environment has been initialized in non-object mode. 
  This call takes as a paramter a type descriptor object (TDO) of datatype 
  OCIType for the named data type being defined.  The TDO can be retrieved 
  with a call to OCITypeByName().
  If the OCI_DATA_AT_EXEC mode was specified in ocibindn() or ocibindp(), the 
  pointers to the IN buffers are obtained either using the callback icbfp 
  registered in the OCIBindDynamic() call or by the OCIStmtSetPieceInfo() call. 
  The buffers are dynamically allocated for the OUT data and the pointers to 
  these buffers are returned either by calling ocbfp() registered by the 
  OCIBindDynamic() or by setting the pointer to the buffer in the buffer passed 
  in by OCIStmtSetPieceInfo() called when OCIStmtExecute() returned 
  OCI_NEED_DATA. The memory of these client library- allocated buffers must be 
  freed when not in use anymore by using the OCIObjectFreee() call.
  Parameters
  bindp ( IN/OUT) - the bind handle returned by the call to OCIBindByName() 
  or OCIBindByPos(). 
  errhp ( IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  type ( IN) - points to the TDO which describes the type of the program 
  variable being bound. Retrieved by calling OCITypeByName().
  pgvpp ( IN/OUT) - points to a pointer to the program variable buffer. For an 
  array, pgvpp points to an array of pointers. When the bind variable is also an 
  OUT variable, the OUT Named Data Type value or REF is allocated 
  (unpickled) in the Object Cache, and a pointer to the value or REF is returned,
  At the end of execute, when all OUT values have been received, pgvpp points 
  to an array of pointer(s) to these newly allocated named data types in the 
  object cache. 
  pgvpp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the Named 
  Data Type buffers are requested at runtime. For static array binds, skip 
  factors may be specified using the OCIBindArrayOfStruct() call. The skip 
  factors are used to compute the address of the next pointer to the value, the 
  indicator structure and their sizes.
  pvszsp ( IN/OUT) - points to the size of the program variable. The size of the 
  named data type is not required on input. For an array, pvszsp is an array of 
  ub4s. On return, for OUT bind variables, this points to size(s) of the Named 
  Data Types and REFs received. pvszsp is ignored if the OCI_DATA_AT_EXEC 
  mode is set. Then the size of the buffer is taken at runtime.
  indpp ( IN/OUT) - points to a pointer to the program variable buffer 
  containing the parallel indicator structure. For an array, points to an array 
  of pointers. When the bind variable is also an OUT bind variable, memory is 
  allocated in the object cache, to store the unpickled OUT indicator values. At 
  the end of the execute when all OUT values have been received, indpp points 
  to the pointer(s) to these newly allocated indicator structure(s). 
  indpp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the indicator 
  is requested at runtime.
  indszp ( IN/OUT) - points to the size of the IN indicator structure program 
  variable. For an array, it is an array of sb2s. On return for OUT bind 
  variables, this points to size(s) of the received OUT indicator structures.
  indszp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the indicator 
  size is requested at runtime.
  Related Functions
  OCIAttrGet()
  
  
  
  ----------------------------------OCIBreak------------------------------------
  
  
  OCIBreak()
  Name
  OCI Break
  Purpose
  This call performs an immediate (asynchronous) abort of any currently 
  executing OCI function that is associated with a server .
  Syntax
  sword OCIBreak ( dvoid      *hndlp,
                   OCIError   *errhp);
  Comments
  This call performs an immediate (asynchronous) abort of any currently 
  executing OCI function that is associated with a server. It is normally used 
  to stop a long-running OCI call being processed on the server.
  This call can take either the service context handle or the server context 
  handle as a parameter to identify the function to be aborted.
  Parameters
  hndlp (IN) - the service context handle or the server context handle.
  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  Related Functions
  
  -----------------------------OCIConnectionPoolCreate --------------------------
  Name:
  OCIConnectionPoolCreate
  
  Purpose:
  Creates the connections in the pool
  
  Syntax:
  OCIConnectionPoolCreate (OCIEnv *envhp, OCIError *errhp, OCICPool *poolhp,
                           OraText **poolName, sb4 *poolNameLen, 
                           CONST Oratext *dblink, sb4 dblinkLen,
                           ub4 connMin, ub4 connMax, ub4 connIncr,
                           CONST OraText *poolUsername, sb4 poolUserLen,
                           CONST OraText *poolPassword, sb4 poolPassLen, 
                           ub4 mode)
  Comments:
  This call is used to create a connection pool. conn_min connections
  to the database are started on calling OCIConnectionPoolCreate.
  
  Parameters:
  envhp (IN/OUT)  - A pointer to the environment where the Conencton Pool
                    is to be created
  errhp (IN/OUT)  - An error handle which can be passed to OCIErrorGet().
  poolhp (IN/OUT) - An uninitialiazed pool handle.
  poolName (OUT) - The connection pool name. 
  poolNameLen (OUT) - The length of the connection pool name 
  dblink (IN/OUT) - Specifies the database(server) to connect. This will also
                    be used as the default pool name.
  dblinkLen (IN)  - The length of the string pointed to by dblink.
  connMin (IN)    - Specifies the minimum number of connections in the
                    Connection Pool at any instant.
                    connMin number of connections are started when
                    OCIConnectionPoolCreate() is called.
  connMax (IN)    - Specifies the maximum number of connections that can be
                    opened to the database. Once this value is reached, no
                    more connections are opened.
  connIncr (IN)   - Allows application to set the next increment for
                    connections to be opened to the database if the current
                    number of connections are less than conn_max.
  poolUsername (IN/OUT) - Connection pooling requires an implicit proxy
                           session and this attribute provides a username
                           for that session.
  poolUserLen (IN) - This represents the length of pool_username.
  poolPassword (IN/OUT) - The password for the parameter pool_username passed
                          above.
  poolPassLen (IN) - This represents the length of pool_password.
  
  mode (IN) - The modes supported are OCI_DEFAULT and 
  OCI_CPOOL_REINITIALIZE 
  
  Related Functions
  OCIConnectionPoolDestroy()
  
  ---------------------------------------------------------------------------
  
  ----------------------------OCIConnectionPoolDestroy-------------------------
  Name:
  OCIConnectionPoolDestroy
  
  Purpose:
  Terminates the connections in the pool
  
  Syntax:
  OCIConnectionPoolDestroy (OCICPool *poolhp, OCIError *errhp, ub4 mode)
  
  Comments:
  On calling OCIConnectionPoolDestroy, all the open connections in the pool
  are closed and the pool is destroyed.
  
  Parameters:
  poolhp (IN/OUT) - An initialiazed pool handle.
  errhp (IN/OUT)  - An error handle which can be passed to OCIErrorGet().
  mode (IN)       - Currently, OCIConnectionPoolDestroy() will support only
                    the OCI_DEFAULT mode.
  
  Related Functions:
  OCIConnectionPoolCreate()
  
  -----------------------------------------------------------------------------
  ----------------------------OCISessionPoolCreate-----------------------------
  Name: 
  OCISessionPoolCreate
  
  Purpose:
  Creates the sessions in the session pool.
  
  Syntax:
  sword OCISessionPoolCreate (OCIEnv *envhp, OCIError *errhp, OCISpool *spoolhp, 
                        OraText **poolName, ub4 *poolNameLen, 
                        CONST OraText *connStr, ub4 connStrLen,
                        ub4 sessMin, ub4 sessMax, ub4 sessIncr,
                        OraText *userid,  ub4 useridLen,
                        OraText *password, ub4 passwordLen,
                        ub4 mode)
  
  Comments:
  When OCISessionPoolCreate is called, a session pool is initialized for
  the associated environment and the database specified by the
  connStr parameter. This pool is named uniquely and the name
  is returned to the user in the poolname parameter.
  
  Parameters:
  envhp (IN/OUT) - A pointer to the environment handle in which the session
                   pool needs to be created.
  errhp (IN/OUT) - An error handle which can be passed to OCIErrorGet().
  spoolhp (IN/OUT) - A pointer to the session pool handle that is created.
  poolName (OUT) - Session pool name returned to the user.
  poolNameLen (OUT) - Length of the PoolName
  connStr (IN) - The TNS alias of the database to connect to.
  connStrLen (IN) - Length of the connStr.
  sessMin (IN) - Specifies the minimum number of sessions in the Session Pool.
                 These are the number of sessions opened in the beginning, if
                 in Homogeneous mode. Else, the parameter is ignored.
  sessMax (IN) - Specifies the maximum number of sessions in the Session Pool.
                 Once this value is reached, no more sessions are opened,
                 unless the OCI_ATTR_SPOOL_FORCEGET is set.
  userid (IN) - Specifies the userid with which to start up the sessions.
  useridLen (IN) - Length of userid.
  password (IN) - Specifies the password for the corresponding userid.
  passwordLen (IN) - Specifies the length of the password
  mode(IN) - May be OCI_DEFAULT, OCI_SPC_SPOOL_REINITIALIZE, or
             OCI_SPC_SPOOL_HOMOGENEOUS.
  
  Returns:
  SUCCESS - If pool could be allocated and created successfully.
  ERROR - If above conditions could not be met.
  
  Related Functions:
  OCISessionPoolDestroy()
  -----------------------------------------------------------------------------
  -----------------------------OCISessionPoolDestroy---------------------------
  Name:
  OCISessionPoolDestroy
  
  Purpose:
  Terminates all the sessions in the session pool.
  
  Syntax:
  sword OCISessionPoolDestroy (OCISPool *spoolhp, OCIError *errhp, ub4 mode)
  
  Comments:
  spoolhp (IN/OUT) - The pool handle of the session pool to be destroyed.
  errhp (IN/OUT) - An error handle which can be passed to OCIErrorGet().
  mode (IN) - Currently only OCI_DEFAULT mode is supported.
  
  Returns:
  SUCCESS - All the sessions could be closed.
  ERROR - If the above condition is not met.
  
  Related Functions:
  OCISessionPoolCreate()
  -----------------------------------------------------------------------------
  -------------------------------OCISessionGet---------------------------------
  Name:
  OCISessionGet
  
  Purpose:
  Get a session. This could be from a session pool, connection pool or
  a new standalone session.
  
  Syntax:
  sword OCISessionGet(OCIenv *envhp, OCIError *errhp, OCISvcCtx **svchp,
                      OCIAuthInfo *authhp,
                      OraText *poolName, ub4 poolName_len,
                      CONST OraText *tagInfo, ub4 tagInfo_len,
                      OraText **retTagInfo, ub4 *retTagInfo_len,
                      boolean *found,
                      ub4 mode)
  
  Comments:
  envhp (IN/OUT) - OCI environment handle.
  errhp (IN/OUT) - OCI error handle to be passed to OCIErrorGet().
  svchp (IN/OUT) - Address of an OCI service context pointer. This will be
                   filled with a server and session handle, attached to the
                   pool.
  authhp (IN/OUT) - OCI Authentication Information handle.
  poolName (IN) - This indicates the session/connection pool to get the
                  session/connection from in the OCI_SPOOL/OCI_CPOOL mode.
                  In the OCI_DEFAULT mode it refers to the connect string.
  poolName_len (IN) - length of poolName.
  tagInfo (IN) - indicates the tag of the session that the user wants. If the
                     user wants a default session, he must specify a NULL here.
                     Only used for Session Pooling.
  tagInfo_len (IN) - the length of tagInfo.
  retTagInfo (OUT) - This indicates the type of session that is returned to
                     the user. Only used for Session Pooling.
  retTagInfo_len (OUT) - the length of retTagInfo.
  found (OUT) - set to true if the user gets a session he had requested, else
                set to false. Only used for Session Pooling.
  mode (IN) - The supported modes are OCI_DEFAULT, OCI_CRED_PROXY and
              OCI_GET_SPOOL_MATCHANY, OCI_SPOOL and OCI_CPOOL. OCI_SPOOL and
              OCI_CPOOL are mutually exclusive.
  
  Returns:
  SUCCESS -  if a session was successfully returned into svchp.
  SUCCESS_WITH_INFO - if a session was successfully returned into svchp and the
                      total number of sessions > maxsessions. Only valid for
                      Session Pooling.
  ERROR - If a session could not be retrieved.
  
  Related Functions:
  OCISessionRelease()
  -----------------------------------------------------------------------------
  ---------------------------OCISessionRelease---------------------------------
  Name:
  OCISessionRelease
  
  Purpose:
  Release the session.
  
  Syntax:
  sword OCISessionRelease ( OCISvcCtx *svchp, OCIError *errhp,
                            OraText *tag, ub4 tag_len,
                            ub4 mode);
  
  Comments:
  svchp (IN/OUT) - The service context associated with the session/connection.
  errhp (IN/OUT) - OCI error handle to be passed to OCIErrorGet().
  tag (IN) - Only used for Session Pooling.
             This parameter will be ignored unless mode OCI_RLS_SPOOL_RETAG is
             specified. In this case, the session is labelled with this tag and
             returned to the pool. If this is NULL, then the session is untagged.
  tag_len (IN) - Length of the tag. This is ignored unless mode 
                 OCI_RLS_SPOOL_RETAG is set.
  mode (IN) - The supported modes are OCI_DEFAULT, OCI_RLS_SPOOL_DROPSESS,
              OCI_RLS_SPOOL_RETAG. The last 2 are only valid for Session Pooling.
              When OCI_RLS_SPOOL_DROPSESS is specified, the session
              will be removed from the session pool. If OCI_RLS_SPOOL_RETAG 
              is set, the tag on the session will be altered. If this mode is 
              not set, the tag and tag_len parameters will be ignored.
  
  Returns:
  ERROR - If the session could not be released successfully.
  SUCCESS - In all other cases.
  
  Related Functions:
  OCISessionGet().
  -----------------------------------------------------------------------------
  ------------------------------OCIDateTimeAssign --------------------------
  sword OCIDateTimeAssign(dvoid *hndl, OCIError *err, CONST OCIDateTime *from, 
                          OCIDateTime *to);
  NAME: OCIDateTimeAssign - OCIDateTime Assignment
  PARAMETERS:
  hndl (IN) - Session/Env handle.
  err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
  from (IN) - datetime to be assigned
  to (OUT) - lhs of assignment
  DESCRIPTION:
          Performs date assignment. The type of the output will be same as that
          of input
  
  ------------------------------OCIDateTimeCheck----------------------------
  sword OCIDateTimeCheck(dvoid *hndl, OCIError *err, CONST OCIDateTime *date, 
                   ub4 *valid );
  NAME: OCIDateTimeCheck - OCIDateTime CHecK if the given date is valid
  PARAMETERS:
  hndl (IN) - Session/Env handle. 
  err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
  date (IN) - date to be checked
  valid (OUT) -  returns zero for a valid date, otherwise 
                  the ORed combination of all error bits specified below:
     Macro name                   Bit number      Error
     ----------                   ----------      -----
     OCI_DATE_INVALID_DAY         0x1             Bad day
     OCI_DATE_DAY_BELOW_VALID     0x2             Bad DAy Low/high bit (1=low)
     OCI_DATE_INVALID_MONTH       0x4             Bad MOnth
     OCI_DATE_MONTH_BELOW_VALID   0x8             Bad MOnth Low/high bit (1=low)
     OCI_DATE_INVALID_YEAR        0x10            Bad YeaR
     OCI_DATE_YEAR_BELOW_VALID    0x20            Bad YeaR Low/high bit (1=low)
     OCI_DATE_INVALID_HOUR        0x40            Bad HouR
     OCI_DATE_HOUR_BELOW_VALID    0x80            Bad HouR Low/high bit (1=low)
     OCI_DATE_INVALID_MINUTE      0x100           Bad MiNute
     OCI_DATE_MINUTE_BELOW_VALID  0x200           Bad MiNute Low/high bit (1=low)
     OCI_DATE_INVALID_SECOND      0x400           Bad SeCond
     OCI_DATE_SECOND_BELOW_VALID  0x800           bad second Low/high bit (1=low)
     OCI_DATE_DAY_MISSING_FROM_1582 0x1000        Day is one of those "missing"
                                                  from 1582
     OCI_DATE_YEAR_ZERO           0x2000          Year may not equal zero
     OCI_DATE_INVALID_TIMEZONE    0x4000          Bad Timezone
     OCI_DATE_INVALID_FORMAT      0x8000          Bad date format input
  
     So, for example, if the date passed in was 2/0/1990 25:61:10 in
     (month/day/year hours:minutes:seconds format), the error returned
     would be OCI_DATE_INVALID_DAY | OCI_DATE_DAY_BELOW_VALID |
     OCI_DATE_INVALID_HOUR | OCI_DATE_INVALID_MINUTE
  
  DESCRIPTION:
          Check if the given date is valid.
  RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            'date' and 'valid' pointers are NULL pointers
  
  ------------------------------- OCIDateTimeCompare----------------------------
  sword OCIDateTimeCompare(dvoid *hndl, OCIError *err, CONST OCIDateTime *date1, 
                       CONST OCIDateTime *date2,  sword *result );
  NAME: OCIDateTimeCompare - OCIDateTime CoMPare dates
  PARAMETERS:
  hndl (IN) - Session/Env handle. 
  err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
  date1, date2 (IN) - dates to be compared
  result (OUT) - comparison result, 0 if equal, -1 if date1 < date2, 
                  1 if date1 > date2
  DESCRIPTION:
  The function OCIDateCompare compares two dates. It returns -1 if 
  date1 is smaller than date2, 0 if they are equal, and 1 if date1 is 
  greater than date2.
  RETURNS:
         OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            invalid date
            input dates are not mutually comparable
  
  ------------------------------OCIDateTimeConvert----------------------
  sword OCIDateTimeConvert(dvoid *hndl, OCIError *err, OCIDateTime *indate, 
                                  OCIDateTime *outdate);
  NAME: OCIDateTimeConvert - Conversion between different DATETIME types
  PARAMETERS:
  hndl (IN) - Session/Env handle. 
  err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
  indate (IN) - pointer to input date
  outdate (OUT) - pointer to output datetime 
  DESCRIPTION: Converts one datetime type to another. The result type is
         the type of the 'outdate' descriptor.
  RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
              conversion not possible.
     
  ---------------------------- OCIDateTimeFromText-----------------------
  sword OCIDateTimeFromText(dvoid *hndl, OCIError *err, CONST OraText *date_str, 
               size_t d_str_length, CONST OraText *fmt, ub1 fmt_length,
               CONST OraText *lang_name, size_t lang_length, OCIDateTime *date );
  NAME: OCIDateTimeFromText - OCIDateTime convert String FROM Date
  PARAMETERS:
  hndl (IN) - Session/Env handle. If Session Handle is passed, the 
                      conversion takes place in session NLS_LANGUAGE and
                      session NLS_CALENDAR, otherwise the default is used.
  err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
  date_str (IN) - input string to be converted to Oracle date
  d_str_length (IN) - size of the input string, if the length is -1
                  then 'date_str' is treated as a null terminated  string
  fmt (IN) - conversion format; if 'fmt' is a null pointer, then
                  the string is expected to be in the default format for
                  the datetime type.
  fmt_length (IN) - length of the 'fmt' parameter
  lang_name (IN) - language in which the names and abbreviations of
                  days and months are specified, if null i.e. (OraText *)0,
                  the default language of session is used, 
  lang_length (IN) - length of the 'lang_name' parameter
  date (OUT) - given string converted to date
  DESCRIPTION:
          Converts the given string to Oracle datetime type set in the 
          OCIDateTime descriptor according to the specified format. Refer to 
          "TO_DATE" conversion function described in "Oracle SQL Language 
          Reference Manual" for a description of format.
  RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            invalid format
            unknown language
            invalid input string
  
  --------------------------- OCIDateTimeGetDate-------------------------
  sword OCIDateTimeGetDate(dvoid *hndl, OCIError *err,  CONST OCIDateTime *date, 
                             sb2 *year, ub1 *month, ub1 *day );
  NAME: OCIDateTimeGetDate - OCIDateTime Get Date (year, month, day)  
                                  portion of DATETIME. 
  PARAMETERS:
  hndl (IN) - Session/Env handle. 
  err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
  datetime (IN) - Pointer to OCIDateTime 
  year      (OUT) - year value
  month     (OUT) - month value
  day       (OUT) - day value
  
  --------------------------- OCIDateTimeGetTime ------------------------
  sword OCIDateTimeGetTime(dvoid *hndl, OCIError *err, OCIDateTime *datetime,
                   ub1 *hour, ub1 *minute, ub1 *sec, ub4 *fsec);
  NAME: OCIDateTimeGetTime - OCIDateTime Get Time (hour, min, second, 
                          fractional second)  of DATETIME. 
  PARAMETERS:
  hndl (IN) - Session/Env handle. 
  err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
  datetime (IN) - Pointer to OCIDateTime 
  hour      (OUT) - hour value
  minute       (OUT) - minute value
  sec       (OUT) - second value
  fsec      (OUT) - Fractional Second value
  
  --------------------------- OCIDateTimeGetTimeZoneOffset ----------------------
  sword OCIDateTimeGetTimeZoneOffset(dvoid *hndl,OCIError *err,CONST 
                OCIDateTime *datetime,sb1 *hour,sb1  *minute);
  
  NAME: OCIDateTimeGetTimeZoneOffset - OCIDateTime Get TimeZone (hour, minute)  
                           portion of DATETIME. 
  PARAMETERS:
  hndl (IN) - Session/Env handle. 
  err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
  datetime (IN) - Pointer to OCIDateTime 
  hour      (OUT) - TimeZone Hour value
  minute     (OUT) - TimeZone Minute value
  
  --------------------------- OCIDateTimeSysTimeStamp---------------------
  sword OCIDateTimeSysTimeStamp(dvoid *hndl, OCIError *err, 
                OCIDateTime *sys_date );
   
  NAME: OCIDateTimeSysTimeStamp - Returns system date/time as a TimeStamp with 
                        timezone
  PARAMETERS:
  hndl (IN) - Session/Env handle. 
  err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
  sys_date (OUT) - Pointer to output timestamp
   
  DESCRIPTION: 
          Gets the system current date and time as a timestamp with timezone
  RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
  
  
  ------------------------------OCIDateTimeIntervalAdd----------------------
  sword OCIDateTimeIntervalAdd(dvoid *hndl, OCIError *err, OCIDateTime *datetime,
           OCIInterval *inter, OCIDateTime *outdatetime);
  NAME: OCIDateTimeIntervalAdd - Adds an interval to datetime
  PARAMETERS:
  hndl (IN) - Session/Env handle.
  err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
  datetime (IN) - pointer to input datetime
  inter    (IN) - pointer to interval 
  outdatetime (IN) - pointer to output datetime. The output datetime 
                                  will be of same type as input datetime
  DESCRIPTION: 
          Adds an interval to a datetime to produce a resulting datetime
  RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if:
                  resulting date is before Jan 1, -4713
                  resulting date is after Dec 31, 9999
  
  ------------------------------OCIDateTimeIntervalSub----------------------
  sword OCIDateTimeIntervalSub(dvoid *hndl, OCIError *err, OCIDateTime *datetime,
                OCIInterval *inter, OCIDateTime *outdatetime);
  NAME: OCIDateTimeIntervalSub - Subtracts an interval from a datetime
  PARAMETERS:
  hndl (IN) - Session/Env handle. 
  err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
  datetime (IN) - pointer to input datetime
  inter    (IN) - pointer to interval 
  outdatetime (IN) - pointer to output datetime. The output datetime 
                                  will be of same type as input datetime
  DESCRIPTION: 
          Subtracts an interval from a datetime and stores the result in a
          datetime
  RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if:
                  resulting date is before Jan 1, -4713
                  resulting date is after Dec 31, 9999
  
  --------------------------- OCIDateTimeConstruct-------------------------
  sword OCIDateTimeConstruct(dvoid  *hndl,OCIError *err,OCIDateTime *datetime,
                 sb2 year,ub1 month,ub1 day,ub1 hour,ub1 min,ub1 sec,ub4 fsec,
                 OraText  *timezone,size_t timezone_length);
  
  NAME: OCIDateTimeConstruct - Construct an OCIDateTime. Only the relevant
         fields for the OCIDateTime descriptor types are used.
  PARAMETERS:
          hndl (IN) - Session/Env handle. 
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          datetime (IN) - Pointer to OCIDateTime 
          year      (IN) - year value
          month     (IN) - month value
          day       (IN) - day value        
          hour      (IN) - hour value
          min       (IN) - minute value
          sec       (IN) - second value
          fsec      (IN) - Fractional Second value
          timezone  (IN) - Timezone string
          timezone_length(IN) - Length of timezone string
  
  DESCRIPTION:
         Constructs a DateTime descriptor. The type of the datetime is the
         type of the OCIDateTime descriptor. Only the relevant fields based
         on the type are used. For Types with timezone, the date and time
         fields are assumed to be in the local time of the specified timezone.
         If timezone is not specified, then session default timezone is
         assumed.
  RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_ERROR if datetime is not valid.
  
  ------------------------------OCIDateTimeSubtract-----------------------
  sword OCIDateTimeSubtract(dvoid *hndl, OCIError *err, OCIDateTime *indate1, 
                  OCIDateTime *indate2, OCIInterval *inter);
  NAME: OCIDateTimeSubtract - subtracts two datetimes to return an interval
  PARAMETERS:
  hndl (IN) - Session/Env handle. 
  err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
  indate1(IN) - pointer to subtrahend
  indate2(IN) - pointer to minuend
  inter  (OUT) - pointer to output interval
  DESCRIPTION: 
          Takes two datetimes as input and stores their difference in an 
          interval. The type of the interval is the type of the 'inter'
          descriptor.
  RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
             datetimes are not comparable.
  
  --------------------------- OCIDateTimeToText--------------------------
  sword OCIDateTimeToText(dvoid *hndl, OCIError *err, CONST OCIDateTime *date, 
                          CONST OraText *fmt, ub1 fmt_length, ub1 fsprec, 
                          CONST OraText *lang_name, size_t lang_length, 
                          ub4 *buf_size, OraText *buf );
  NAME: OCIDateTimeToText - OCIDateTime convert date TO String 
  PARAMETERS:
  hndl (IN) - Session/Env handle. If Session Handle is passed, the 
                      conversion takes place in session NLS_LANGUAGE and
                      session NLS_CALENDAR, otherwise the default is used.
  err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
  date (IN) - Oracle datetime to be converted
  fmt (IN) - conversion format, if null string pointer (OraText*)0, then
                  the date is converted to a character string in the
                  default format for that type.
  fmt_length (IN) - length of the 'fmt' parameter
  fsprec (IN) - specifies the fractional second precision in which the
                 fractional seconds is returned.
  lang_name (IN) - specifies the language in which the names and 
                  abbreviations of months and days are returned;
                  default language of session is used if 'lang_name' 
                  is null i.e. (OraText *)0
  lang_length (IN) - length of the 'nls_params' parameter
  buf_size (IN/OUT) - size of the buffer; size of the resulting string
                  is returned via this parameter
  buf (OUT) - buffer into which the converted string is placed
  DESCRIPTION:
          Converts the given date to a string according to the specified format.
          Refer to "TO_DATE" conversion function described in
          "Oracle SQL Language Reference Manual" for a description of format
          and NLS arguments. The converted null-terminated date string is
          stored in the buffer 'buf'.
  RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            buffer too small
            invalid format
            unknown language
            overflow error
  
  ----------------------------OCIDateTimeGetTimeZoneName------------------------
  sword OCIDateTimeGetTimeZoneName(dvoid *hndl, 
                                   OCIError *err,
                                   CONST OCIDateTime *datetime,
                                   ub1 *buf,
                                   ub4 *buflen);
  NAME OCIDateTimeGetTimeZoneName - OCI DateTime Get the Time Zone Name
  PARAMETERS:
  hndl (IN)      - Session/Env handle.
  err (IN/OUT)   - error handle. If there is an error, it is
                   recorded in 'err' and this function returns OCI_ERROR.
                   The error recorded in 'err' can be retrieved by calling
                   OCIErrorGet().
  datetime (IN)   - Pointer to an OCIDateTime.
  buf (OUT)       - User allocated storage for name string.
  buflen (IN/OUT) - length of buf on input, length of name on out
  DESCRIPTION:
          Returns either the timezone region name or the absolute hour and minute
          offset. If the DateTime was created with a region id then the region 
          name will be returned in the buf.  If the region id is zero, then the 
          hour and minute offset is returned as "[-]HH:MM".
  RETURNS:
         OCI_SUCCESS if the function completes successfully.
         OCI_INVALID_HANDLE if 'err' is NULL.
         OCI_ERROR if
           buffer too small
           error retrieving timezone data
           invalid region 
           invalid LdiDateTime type
  
  ---------------------------------OCIDateTimeToArray----------------------------
  sword OCIDateTimeToArray(dvoid *hndl, 
                           OCIError *err,
                           CONST OCIDateTime *datetime,
                           CONST OCIInterval *reftz,
                           ub1 *outarray,
                           ub4 *len
                           ub1 *fsprec);
  NAME OCIDateTimeToArray - OCI DateTime convert To Array format
  PARAMETERS:
  hndl (IN)      - Session/Env handle.
  err (IN/OUT)   - error handle. If there is an error, it is
                   recorded in 'err' and this function returns OCI_ERROR.
                   The error recorded in 'err' can be retrieved by calling
                   OCIErrorGet().
  datetime (IN)   - Pointer to OCIDateTime to be converted.
  outarray (OUT)  - Result array storage
  len (OUT)        - pointer to  length of outarray.
  fsprec (IN)     - Number of fractional seconds digits.
  DESCRIPTION:
          Returns an array representing the input DateTime descriptor.
  RETURNS:
         OCI_SUCCESS if the function completes successfully.
         OCI_INVALID_HANDLE if 'err' is NULL.
         OCI_ERROR if
           buffer too small
           error retrieving timezone data
           invalid region 
           invalid LdiDateTime type
  
  --------------------------------OCIDateTimeFromArray---------------------------
  sword OCIDateTimeFromArray(dvoid *hndl, 
                           OCIError *err,
                           ub1 *inarray,
                           ub4 len
                           ub1 type
                           OCIDateTime *datetime,
                           OCIInterval *reftz,
                           ub1 fsprec);
  NAME OCIDateTimeFromArray - OCI DateTime convert From Array format
  PARAMETERS:
  hndl (IN)      - Session/Env handle.
  err (IN/OUT)   - error handle. If there is an error, it is
                   recorded in 'err' and this function returns OCI_ERROR.
                   The error recorded in 'err' can be retrieved by calling
                   OCIErrorGet().
  inarray (IN)   - Pointer to input array representtion of DateTime
  len (IN)       - len of inarray.
  type (IN)      - One of SQLT_DATE, SQLT_TIME, SQLT_TIME_TZ, SQLT_TIMESTAMP,
                   SQLT_TIMESTAMP_TZ, or SQLT_TIMESTAMP_LTZ.
  datetime (OUT) - Pointer to the result OCIDateTime.
  reftz (IN)     - timezone interval used with SQLT_TIMESTAMP_LTZ.
  fsprec (IN)    - fractionl seconds digits of precision (0-9).
  DESCRIPTION:
          Returns a pointer to an OCIDateTime of type type converted from 
          the inarray.
  RETURNS:
         OCI_SUCCESS if the function completes successfully.
         OCI_INVALID_HANDLE if 'err' is NULL.
         OCI_ERROR if
           buffer too small
           error retrieving timezone data
           invalid region 
           invalid LdiDateTime type
  
  ----------------------------------OCIRowidToChar-----------------------------
  Name
  OCIRowidToChar
  
  Purpose
  Converts physical/logical (universal) ROWID to chracter extended (Base 64) 
  representation into user provided buffer outbfp of length outbflp. After 
  execution outbflp contains amount of bytes converted.In case of truncation 
  error, outbflp contains required size to make this conversion successful
  and returns ORA-1405.
  
  Syntax
  sword OCIRowidToChar( OCIRowid *rowidDesc, 
                        OraText *outbfp, 
                        ub2 *outbflp, 
                        OCIError *errhp)
  
  Comments
  After this conversion, ROWID in character format can be bound using
  OCIBindByPos or OCIBindByName call and used to query a row at a
  desired ROWID. 
  
  Parameters
  rowidDesc (IN)   - rowid DESCriptor which is allocated from OCIDescritorAlloc
                     and populated by a prior SQL statement execution
  outbfp (OUT)     - pointer to the buffer where converted rowid in character 
                     representation is stored after successful execution.
  outbflp (IN/OUT) - pointer to output buffer length variable.
                     Before execution (IN mode) *outbflp contains the size of
                     outbfp, after execution (OUT mode) *outbflp contains amount
                     of bytes converted. In an event of truncation during 
                     conversion *outbflp contains the required length to make
                     conversion successful.
  errhp (IN/OUT)   - an error handle which can be passed to OCIErrorGet() for
                     diagnostic information in the event of an error.
  
  ------------------------------OCIDefineArrayOfStruct--------------------------
  
  
  OCIDefineArrayOfStruct()
  Name
  OCI Define for Array of Structures
  Purpose
  This call specifies additional attributes necessary for a static array define.
  Syntax
  sword OCIDefineArrayOfStruct ( OCIDefine   *defnp,
                               OCIError    *errhp,
                               ub4         pvskip, 
                               ub4         indskip, 
                               ub4         rlskip,
                               ub4         rcskip );
  Comments
  This call specifies additional attributes necessary for an array define, 
  used in an array of structures (multi-row, multi-column) fetch.
  For more information about skip parameters, see the section "Skip Parameters" 
  on page 4-17.
  Parameters
  defnp (IN) - the handle to the define structure which was returned by a call 
  to OCIDefineByPos().
  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  pvskip (IN) - skip parameter for the next data value.
  indskip (IN) - skip parameter for the next indicator location. 
  rlskip (IN) - skip parameter for the next return length value.
  rcskip (IN) - skip parameter for the next return code.
  Related Functions
  OCIAttrGet()
  
  
  
  
  
  OCIDefineByPos()
  Name
  OCI Define By Position
  Purpose
  Associates an item in a select-list with the type and output data buffer. 
  Syntax
  sb4 OCIDefineByPos ( 
                OCIStmt     *stmtp, 
                OCIDefine   **defnp,
                OCIError    *errhp,
                ub4         position,
                dvoid       *valuep,
                sb4         value_sz,
                ub2         dty,
                dvoid       *indp,
                ub2         *rlenp,
                ub2         *rcodep,
                ub4         mode );
  Comments
  This call defines an output buffer which will receive data retreived from 
  Oracle. The define is a local step which is necessary when a SELECT statement 
  returns data to your OCI application.
  This call also implicitly allocates the define handle for the select-list item.
  Defining attributes of a column for a fetch is done in one or more calls. The 
  first call is to OCIDefineByPos(), which defines the minimal attributes 
  required to specify the fetch. 
  This call takes as a parameter a define handle, which must have been 
  previously allocated with a call to OCIHandleAlloc().
  Following the call to OCIDefineByPos() additional define calls may be 
  necessary for certain data types or fetch modes:
  A call to OCIDefineArrayOfStruct() is necessary to set up skip parameters 
  for an array fetch of multiple columns.
  A call to OCIDefineObject() is necessary to set up the appropriate 
  attributes of a named data type fetch. In this case the data buffer pointer 
  in ocidefn() is ignored.
  Both OCIDefineArrayOfStruct() and OCIDefineObject() must be called 
  after ocidefn() in order to fetch multiple rows with a column of named 
  data types.
  For a LOB define, the buffer pointer must be a lob locator of type 
  OCILobLocator , allocated by the OCIDescAlloc() call. LOB locators, and not 
  LOB values, are always returned for a LOB column. LOB values can then be 
  fetched using OCI LOB calls on the fetched locator.
  For NCHAR (fixed and varying length), the buffer pointer must point to an 
  array of bytes sufficient for holding the required NCHAR characters. 
  Nested table columns are defined and fetched like any other named data type. 
  If the mode parameter is this call is set to OCI_DYNAMIC_FETCH, the client 
  application can fetch data dynamically at runtime.
  Runtime data can be provided in one of two ways:
  callbacks using a user-defined function which must be registered with a 
  subsequent call to OCIDefineDynamic(). When the client library needs a 
  buffer to return the fetched data, the callback will be invoked and the 
  runtime buffers provided will return a piece or the whole data. 
  a polling mechanism using calls supplied by the OCI. This mode is 
  assumed if no callbacks are defined. In this case, the fetch call returns the 
  OCI_NEED_DATA error code, and a piecewise polling method is used 
  to provide the data.
  Related Functions: For more information about using the 
  OCI_DYNAMIC_FETCH mode, see the section "Runtime Data 
  Allocation and Piecewise Operations" on page 5-16 of Volume 1..
  For more information about the define step, see the section "Defining" 
  on page 2-30.
  Parameters
  stmtp (IN) - a handle to the requested SQL query operation.
  defnp (IN/OUT) - a pointer to a pointer to a define handle which is implicitly 
  allocated by this call.  This handle is used to  store the define information 
  for this column.
  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  position (IN) - the position of this value in the select list. Positions are 
  1-based and are numbered from left to right. For example, in the SELECT 
  statement
  SELECT empno, ssn, mgrno FROM employees;
  empno is at position 1, ssn is at position 2, and mgrno is at position 3.
  valuep (IN/OUT) - a pointer to a buffer or an array of buffers of the type 
  specified in the dty parameter. A number of buffers can be specified when 
  results for more than one row are desired in a single fetch call.
  value_sz (IN) - the size of each valuep buffer in bytes. If the data is stored 
  internally in VARCHAR2 format, the number of characters desired, if different 
  from the buffer size in bytes, may be additionally specified by the using 
  OCIAttrSet(). 
  In an NLS conversion environment, a truncation error will be generated if the 
  number of bytes specified is insufficient to handle the number of characters 
  desired.
  dty (IN) - the data type. Named data type (SQLT_NTY) and REF (SQLT_REF) 
  are valid only if the environment has been intialized with in object mode. 
  indp - pointer to an indicator variable or array. For scalar data types, 
  pointer to sb2 or an array of sb2s. Ignored for named data types. For named 
  data types, a pointer to a named data type indicator structure or an array of 
  named data type indicator structures is associated by a subsequent 
  OCIDefineObject() call. 
  See the section "Indicator Variables" on page 2-43 for more information about 
  indicator variables.
  rlenp (IN/OUT) - pointer to array of length of data fetched. Each element in 
  rlenp is the length of the data in the corresponding element in the row after 
  the fetch. 
  rcodep (OUT) - pointer to array of column-level return codes
  mode (IN) - the valid modes are:
  OCI_DEFAULT. This is the default mode.
  OCI_DYNAMIC_FETCH. For applications requiring dynamically 
  allocated data at the time of fetch, this mode must be used. The user may 
  additionally call OCIDefineDynamic() to set up a callback function that 
  will be invoked to receive the dynamically allocated buffers and to set 
  up the memory allocate/free callbacks and the context for the callbacks. 
  valuep and value_sz are ignored in this mode. 
  Related Functions
  OCIDefineArrayOfStruct(), OCIDefineDynamic(), OCIDefineObject()
  
  
  
  
  OCIDefineDynamic()
  Name
  OCI Define Dynamic Fetch Attributes
  Purpose
  This call is used to set the additional attributes required if the 
  OCI_DYNAMIC_FETCH mode was selected in OCIDefineByPos(). 
  Syntax
  sword OCIDefineDynamic( OCIDefine   *defnp,
                        OCIError    *errhp,
                        dvoid       *octxp, 
                        OCICallbackDefine (ocbfp)(
                                    dvoid             *octxp,
                                    OCIDefine         *defnp,
                                    ub4               iter, 
                                    dvoid             **bufpp,
                                    ub4               **alenpp,
                                    ub1               *piecep,
                                    dvoid             **indpp,
                                    ub2               **rcodep)  );
  Comments
  This call is used to set the additional attributes required if the 
  OCI_DYNAMIC_FETCH mode has been selected in a call to 
  OCIDefineByPos(). 
  When the OCI_DYNAMIC_FETCH mode is selected, buffers will be 
  dynamically allocated for REF, and named data type, values to receive the 
  data. The pointers to these buffers will be returned. 
  If OCI_DYNAMIC_FETCH mode was selected, and the call to 
  OCIDefineDynamic() is skipped, then the application can fetch data piecewise 
  using OCI calls.
  For more information about OCI_DYNAMIC_FETCH mode, see the section 
  "Runtime Data Allocation and Piecewise Operations" on page 5-16.
  Parameters
  defnp (IN/OUT) - the handle to a define structure returned by a call to 
  OCIDefineByPos().
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error. 
  octxp (IN) - points to a context for the callback function. 
  ocbfp (IN) - points to a callback function. This is invoked at runtime to get 
  a pointer to the buffer into which the fetched data or a piece of it will be 
  retreived. The callback also specifies the indicator, the return code and the 
  lengths of the data piece and indicator. The callback has the following 
  parameters:
  octxp (IN) - a context pointer passed as an argument to all the callback 
  functions.
  defnp (IN) - the define handle.
  iter (IN) - which row of this current fetch.
  bufpp (OUT) - returns a pointer to a buffer to store the column value, ie. 
  *bufp points to some appropriate storage for the column value.
  alenpp (OUT) - returns a pointer to the length of the buffer. *alenpp 
  contains the size of the buffer after return from callback. Gets set to 
  actual data size after fetch.
  piecep (IN/OUT) - returns a piece value, as follows:
  The IN value can be OCI_ONE_PIECE, OCI_FIRST_PIECE or 
  OCI_NEXT_PIECE.
  The OUT value can be OCI_ONE_PIECE if the IN value was 
  OCI_ONE_PIECE.
  The OUT value can be OCI_ONE_PIECE or OCI_FIRST_PIECE if 
  the IN value was OCI_FIRST_PIECE.
  The OUT value can only be OCI_NEXT_PIECE or 
  OCI_LAST_PIECE if the IN value was OCI_NEXT_PIECE. 
  indpp (IN) - indicator variable pointer
  rcodep (IN) - return code variable pointer
  Related Functions
  OCIAttrGet()
  OCIDefineObject()
  
  
  
  
  OCIDefineObject()
  Name
  OCI Define Named Data Type attributes
  Purpose
  Sets up additional attributes necessary for a Named Data Type define.
  Syntax
  sword OCIDefineObject ( OCIDefine       *defnp,
                        OCIError        *errhp,
                        CONST OCIType   *type,
                        dvoid           **pgvpp, 
                        ub4             *pvszsp, 
                        dvoid           **indpp, 
                        ub4             *indszp );
  Comments
  This call sets up additional attributes necessary for a Named Data Type define.
  An error will be returned if this function is called when the OCI environment 
  has been initialized in non-Object mode.
  This call takes as a paramter a type descriptor object (TDO) of datatype 
  OCIType for the named data type being defined.  The TDO can be retrieved 
  with a call to OCITypeByName().
  See the description of OCIInitialize() on page 13 - 43 for more information 
  about initializing the OCI process environment.
  Parameters
  defnp (IN/OUT) - a define handle previously allocated in a call to 
  OCIDefineByPos(). 
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  type (IN, optional) - points to the Type Descriptor Object (TDO) which 
  describes the type of the program variable. Only used for program variables 
  of type SQLT_NTY. This parameter is optional, and may be passed as NULL 
  if it is not being used.
  pgvpp (IN/OUT) - points to a pointer to a program variable buffer. For an 
  array, pgvpp points to an array of pointers. Memory for the fetched named data 
  type instance(s) is dynamically allocated in the object cache. At the end of 
  the fetch when all the values have been received, pgvpp points to the 
  pointer(s) to these newly allocated named data type instance(s). The 
  application must call OCIObjectMarkDel() to deallocate the named data type 
  instance(s) when they are no longer needed. 
  pvszsp (IN/OUT) - points to the size of the program variable. For an array, it 
  is an array of ub4s. On return points to the size(s) of unpickled fetched 
  values.
  indpp (IN/OUT) - points to a pointer to the program variable buffer 
  containing the parallel indicator structure. For an array, points to an array 
  of pointers. Memory is allocated to store the indicator structures in the 
  object cache. At the end of the fetch when all values have been received, 
  indpp points to the pointer(s) to these newly allocated indicator structure(s).
  indszp (IN/OUT) - points to the size(s) of the indicator structure program 
  variable. For an array, it is an array of ub4s. On return points to the size(s)
  of the unpickled fetched indicator values.
  Related Functions
  OCIAttrGet()
  
  
  
  OCIDescAlloc()
  Name
  OCI Get DESCriptor or lob locator
  Purpose
  Allocates storage to hold certain data types. The descriptors can be used as 
  bind or define variables.
  Syntax
  sword OCIDescAlloc ( CONST dvoid   *parenth,
                     dvoid         **descpp, 
                     ub4           type,
                     size_t        xtramem_sz,
                     dvoid         **usrmempp);
  Comments
  Returns a pointer to an allocated and initialized structure, corresponding to 
  the type specified in type. A non-NULL descriptor or LOB locator is returned 
  on success. No diagnostics are available on error.
  This call returns OCI_SUCCESS if successful, or OCI_INVALID_HANDLE if 
  an out-of-memory error occurs. 
  Parameters
  parenth (IN) - an environment handle. 
  descpp (OUT) - returns a descriptor or LOB locator of desired type. 
  type (IN) - specifies the type of descriptor or LOB locator to be allocated. 
  The specific types are:
  OCI_DTYPE_SNAP - specifies generation of snapshot descriptor of C 
  type - OCISnapshot
  OCI_DTYPE_LOB - specifies generation of a LOB data type locator of C 
  type - OCILobLocator
  OCI_DTYPE_RSET - specifies generation of a descriptor of C type 
  OCIResult that references a result set (a number of rows as a result of a 
  query). This descriptor is bound to a bind variable of data type 
  SQLT_RSET (result set). The descriptor has to be converted into a 
  statement handle using a function - OCIResultSetToStmt() - which can 
  then be passed to OCIDefineByPos() and OCIStmtFetch() to retrieve the 
  rows of the result set.
  OCI_DTYPE_ROWID - specifies generation of a ROWID descriptor of C 
  type OCIRowid.
  OCI_DTYPE_COMPLEXOBJECTCOMP - specifies generation of a 
  complex object retrieval descriptor of C type 
  OCIComplexObjectComp.
  xtramemsz (IN) - specifies an amount of user memory to be allocated for use 
  by the application. 
  usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz 
  allocated by the call for the user. 
  Related Functions
  OCIDescFree()
  
  
  
  
  OCIDescFree()
  Name
  OCI Free DESCriptor
  Purpose
  Deallocates a previously allocated descriptor.
  Syntax
  sword OCIDescFree ( dvoid    *descp,
                    ub4      type);
  Comments
  This call frees up storage associated with the descriptor, corresponding to the
  type specified in type. Returns OCI_SUCCESS or OCI_INVALID_HANDLE. 
  All descriptors must be explicitly deallocated. OCI will not deallocate a 
  descriptor if the environment handle is deallocated.
  Parameters
  descp (IN) - an allocated descriptor. 
  type (IN) - specifies the type of storage to be freed. The specific types are: 
  OCI_DTYPE_SNAP - snapshot descriptor
  OCI_DTYPE_LOB - a LOB data type descriptor
  OCI_DTYPE_RSET - a descriptor that references a result set (a number 
  of rows as a result of a query).
  OCI_DTYPE_ROWID - a ROWID descriptor
  OCI_DTYPE_COMPLEXOBJECTCOMP - a complex object retrieval 
  descriptor
  Related Functions
  OCIDescAlloc()
  
  
  
  OCIDescribeAny()
  Name
  OCI DeSCribe Any
  Purpose
  Describes existing schema objects.
  Syntax
  sword OCIDescribeAny ( OCISvcCtx     *svchp,
                       OCIError      *errhp,
                       dvoid         *objptr,
                       ub4           objnm_len,
                       ub1           objptr_typ,
                       ub1           info_level,
                       ub1           objtype,
                       OCIDesc       *dschp );
  Comments
  This is a generic describe call that describes existing schema objects: tables,
  views, synonyms, procedures, functions, packages, sequences, and types. As a 
  result of this call, the describe handle is populated with the object-specific 
  attributes which can be obtained through an OCIAttrGet() call.
  An OCIParamGet() on the describe handle returns a parameter descriptor for a 
  specified position. Parameter positions begin with 1. Calling OCIAttrGet() on 
  the parameter descriptor returns the specific attributes of a stored procedure 
  or function parameter or a table column descriptor as the case may be. 
  These subsequent calls do not need an extra round trip to the server because 
  the entire schema object description cached on the client side by 
  OCIDescribeAny(). Calling OCIAttrGet() on the describe handle can also return 
  the total number of positions.
  See the section "Describing" on page 2-33 for more information about describe 
  operations.
  Parameters
  TO BE UPDATED
  svchp (IN/OUT) - a service context handle.
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  objptr (IN) - the name of the object (a null-terminated string) to be 
  described. Only procedure or function names are valid when connected to an 
  Oracle7 Server.
  objptr_len (IN) - the length of the string. Must be non-zero.
  objptr_typ (IN) - Must be OCI_OTYPE_NAME, OCI_OTYPE_REF, or OCI_OTYPE_PTR.
  info_level (IN) - reserved for future extensions. Pass OCI_DEFAULT.
  objtype (IN/OUT) - object type.
  dschp (IN/OUT) - a describe handle that is populated with describe 
  information about the object after the call.
  Related Functions
  OCIAttrGet()
  
  
  
  OCIEnvCreate()
  Name
  OCI ENVironment CREATE
  Purpose
  This function creates and initializes an environment for the rest of
  the OCI functions to work under.  This call is a replacement for both
  the OCIInitialize and OCIEnvInit calls.
  Syntax
  sword OCIEnvCreate  ( OCIEnv        **envhpp, 
                        ub4           mode, 
                        CONST dvoid   *ctxp, 
                        CONST dvoid   *(*malocfp) 
                                      (dvoid *ctxp, 
                                          size_t size), 
                        CONST dvoid   *(*ralocfp) 
                                      (dvoid *ctxp, 
                                         dvoid *memptr, 
                                         size_t newsize), 
                        CONST void    (*mfreefp) 
                                      ( dvoid *ctxp, 
                                         dvoid *memptr))
                        size_t    xtramemsz,
                        dvoid     **usrmempp );
   
  Comments
  This call creates an environment for all the OCI calls using the modes
  specified by the user. This call can be used instead of the two calls
  OCIInitialize and OCIEnvInit. This function returns an environment handle
  which is then used by the remaining OCI functions. There can be multiple
  environments in OCI each with its own environment modes.  This function 
  also performs any process level initialization if required by any mode.
  For example if the user wants to initialize an environment as OCI_THREADED,
  then all libraries that are used by OCI are also initialized in the
  threaded mode. 
  
  This call should be invoked before anny other OCI call and should be used
  instead of the OCIInitialize and OCIEnvInit calls. This is the recommended
  call, although OCIInitialize and OCIEnvInit calls will still be supported
  for backward compatibility. 
   
  envpp (OUT) - a pointer to a handle to the environment. 
  mode (IN) - specifies initialization of the mode. The valid modes are:
  OCI_DEFAULT - default mode.
  OCI_THREADED - threaded environment. In this mode, internal data 
  structures are protected from concurrent accesses by multiple threads. 
  OCI_OBJECT - will use navigational object interface. 
  ctxp (IN) - user defined context for the memory call back routines. 
  malocfp (IN) - user-defined memory allocation function. If mode is 
  OCI_THREADED, this memory allocation routine must be thread safe.
  ctxp - context pointer for the user-defined memory allocation function.
  size - size of memory to be allocated by the user-defined memory 
  allocation function
  ralocfp (IN) - user-defined memory re-allocation function. If mode is 
  OCI_THREADED, this memory allocation routine must be thread safe.
  ctxp - context pointer for the user-defined memory reallocation 
  function.
  memp - pointer to memory block
  newsize - new size of memory to be allocated
  mfreefp (IN) - user-defined memory free function. If mode is 
  OCI_THREADED, this memory free routine must be thread safe.
  ctxp - context pointer for the user-defined memory free function.
  memptr - pointer to memory to be freed
  xtramemsz (IN) - specifies the amount of user memory to be allocated. 
  usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz 
  allocated by the call for the user.
  
  Example
  
  Related Functions
  OCIInitialize, OCIEnvInit
  
  OCIEnvNlsCreate()
  Name
  OCI ENVironment CREATE with NLS info
  Purpose
  This function does almost everything OCIEnvCreate does, plus enabling setting
  of charset and ncharset programmatically, except OCI_UTF16 mode.
  Syntax
  sword OCIEnvNlsCreate(OCIEnv        **envhpp,
                        ub4           mode,
                        dvoid         *ctxp,
                        dvoid         *(*malocfp)
                                      (dvoid *ctxp,
                                          size_t size),
                        dvoid         *(*ralocfp)
                                      (dvoid *ctxp,
                                         dvoid *memptr,
                                         size_t newsize),
                        void          (*mfreefp)
                                      (dvoid *ctxp,
                                         dvoid *memptr),
                        size_t        xtramemsz,
                        dvoid         **usrmempp,
                        ub2           charset,
                        ub2           ncharset)
  Comments
  The charset and ncharset must be both zero or non-zero.
  The parameters have the same meaning as the ones in OCIEnvCreate().
  When charset or ncharset is non-zero, the corresponding character set will
  be used to replace the ones specified in NLS_LANG or NLS_NCHAR. Moreover,
  OCI_UTF16ID is allowed to be set as charset and ncharset.
  On the other hand, OCI_UTF16 mode is deprecated with this function. 
  Applications can achieve the same effects by setting 
  both charset and ncharset as OCI_UTF16ID.
  
  
  OCIEnvInit()
  Name
  OCI INITialize environment
  Purpose
  This call initializes the OCI environment handle.
  Syntax
  sword OCIEnvInit ( OCIEnv    **envp,
                   ub4       mode,
                   size_t    xtramemsz,
                   dvoid     **usrmempp );
  Comments
  Initializes the OCI environment handle. No changes are done on an initialized 
  handle. If OCI_ERROR or OCI_SUCCESS_WITH_INFO is returned, the 
  environment handle can be used to obtain ORACLE specific errors and 
  diagnostics.
  This call is processed locally, without a server round-trip.
  Parameters
  envpp (OUT) - a pointer to a handle to the environment. 
  mode (IN) - specifies initialization of an environment mode. The only valid 
  mode is OCI_DEFAULT for default mode
  xtramemsz (IN) - specifies the amount of user memory to be allocated. 
  usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz 
  allocated by the call for the user.
  Example
  See the description of OCISessionBegin() on page 13-84 for an example showing 
  the use of OCIEnvInit(). 
  Related Functions
  
  
  
  
  OCIErrorGet()
  Name
  OCI Get Diagnostic Record
  Purpose
  Returns an error message in the buffer provided and an ORACLE error.
  Syntax
  sword OCIErrorGet ( dvoid      *hndlp, 
                    ub4        recordno,
                    OraText       *sqlstate,
                    ub4        *errcodep, 
                    OraText       *bufp,
                    ub4        bufsiz,
                    ub4        type );
  Comments
  Returns an error message in the buffer provided and an ORACLE error. 
  Currently does not support SQL state. This call can be called a multiple 
  number of times if there are more than one diagnostic record for an error.
  The error handle is originally allocated with a call to OCIHandleAlloc().
  Parameters
  hndlp (IN) - the error handle, in most cases, or the environment handle (for 
  errors on OCIEnvInit(), OCIHandleAlloc()).
  recordno (IN) - indicates the status record from which the application seeks 
  info. Starts from 1. 
  sqlstate (OUT) - Not supported in Version 8.0.
  errcodep (OUT) - an ORACLE Error is returned.
  bufp (OUT) - the error message text is returned.
  bufsiz (IN) - the size of the buffer provide to get the error message.
  type (IN) - the type of the handle.
  Related Functions
  OCIHandleAlloc()
  
  OCIExtractInit
  Name
  OCI Extract Initialize 
  Purpose
  This function initializes the parameter manager. 
  Syntax
  sword OCIExtractInit(dvoid *hndl, OCIError *err);
  Comments
  It must be called before calling any other parameter manager routine. The NLS 
  information is stored inside the parameter manager context and used in 
  subsequent calls to OCIExtract routines.
  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
  Parameters
  hndl (IN/OUT) - The OCI environment or session handle.
  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
                 err and this function returns OCI_ERROR. Diagnostic information 
                 can be obtained by calling OCIErrorGet().
  Related Functions
  OCIExtractTerm()
  
  OCIExtractTerm
  Name
  OCI Extract Terminate
  Purpose
  This function releases all dynamically allocated storage and may perform 
  other internal bookkeeping functions.
  Syntax
  sword OCIExtractTerm(dvoid *hndl, OCIError *err);
  Comments
  It must be called when the parameter manager is no longer being used.
  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
  Parameters
  hndl (IN/OUT) - The OCI environment or session handle.
  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
                 err and this function returns OCI_ERROR. Diagnostic information 
                 can be obtained by calling OCIErrorGet().
  Related Functions
  OCIExtractInit()
  
  OCIExtractReset
  Name
  OCI Extract Reset
  Purpose
  The memory currently used for parameter storage, key definition storage, and 
  parameter value lists is freed and the structure is reinitialized.
  Syntax
  sword OCIExtractReset(dvoid *hndl, OCIError *err);
  Comments
  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
  Parameters
  hndl (IN/OUT) - The OCI environment or session handle.
  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
                 err and this function returns OCI_ERROR. Diagnostic information 
                 can be obtained by calling OCIErrorGet().
  Related Functions
  
  OCIExtractSetNumKeys
  Name
  OCI Extract Set Number of Keys
  Purpose
  Informs the parameter manager of the number of keys that will be registered.
  Syntax
  sword OCIExtractSetNumKeys(dvoid *hndl, OCIError *err, uword numkeys);
  Comments
  This routine must be called prior to the first call of OCIExtractSetKey().  
  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
  Parameters
  hndl (IN/OUT) - The OCI environment or session handle.
  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
                 err and this function returns OCI_ERROR. Diagnostic information 
                 can be obtained by calling OCIErrorGet().
  numkeys (IN) - The number of keys that will be registered with 
                 OCIExtractSetKey().
  Related Functions
  OCIExtractSetKey()
  
  OCIExtractSetKey
  Name
  OCI Extract Set Key definition
  Purpose
  Registers information about a key with the parameter manager.
  Syntax
  sword OCIExtractSetKey(dvoid *hndl, OCIError *err, CONST OraText *name, 
                         ub1 type, ub4 flag, CONST dvoid *defval,
                         CONST sb4 *intrange, CONST OraText *CONST *strlist);
  Comments
  This routine must be called after calling OCIExtractSetKey() and before 
  calling OCIExtractFromFile() or OCIExtractFromStr().  
  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
  Parameters
  hndl (IN/OUT) - The OCI environment or session handle.
  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
                 err and this function returns OCI_ERROR. Diagnostic information 
                 can be obtained by calling OCIErrorGet().
  name (IN) - The name of the key.
  type (IN) - The type of the key (OCI_EXTRACT_TYPE_INTEGER, 
              OCI_EXTRACT_TYPE_OCINUM, OCI_EXTRACT_TYPE_STRING, or 
              OCI_EXTRACT_TYPE_BOOLEAN).
  flag (IN) - Set to OCI_EXTRACT_MULTIPLE if the key can take multiple values 
              or 0 otherwise.
  defval (IN) - Set to the default value for the key.  May be NULL if there is 
                 no default.  A string default must be a (text*) type, an 
                 integer default must be an (sb4*) type, and a boolean default 
                 must be a (ub1*) type.
  intrange (IN) - Starting and ending values for the allowable range of integer 
                  values.  May be NULL if the key is not an integer type or if 
                  all integer values are acceptable.
  strlist (IN) - List of all acceptable text strings for the key.  May be NULL 
                 if the key is not a string type or if all text values are 
                 acceptable.
  Related Functions
  OCIExtractSetNumKeys()
  
  OCIExtractFromFile
  Name
  OCI Extract parameters From File
  Purpose
  The keys and their values in the given file are processed. 
  Syntax
  sword OCIExtractFromFile(dvoid *hndl, OCIError *err, ub4 flag, 
                           OraText *filename);
  Comments
  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
  Parameters
  hndl (IN/OUT) - The OCI environment or session handle.
  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
                 err and this function returns OCI_ERROR. Diagnostic information 
                 can be obtained by calling OCIErrorGet().
  flag (IN) - Zero or has one or more of the following bits set: 
             OCI_EXTRACT_CASE_SENSITIVE, OCI_EXTRACT_UNIQUE_ABBREVS, or 
             OCI_EXTRACT_APPEND_VALUES. 
  filename (IN) - Null-terminated filename string.
  Related Functions
  
  OCIExtractFromStr
  Name
  OCI Extract parameters From String
  Purpose
  The keys and their values in the given string are processed. 
  Syntax
  sword OCIExtractFromStr(dvoid *hndl, OCIError *err, ub4 flag, OraText *input);
  Comments
  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
  Parameters
  hndl (IN/OUT) - The OCI environment or session handle.
  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
                 err and this function returns OCI_ERROR. Diagnostic information 
                 can be obtained by calling OCIErrorGet().
  flag (IN) - Zero or has one or more of the following bits set: 
             OCI_EXTRACT_CASE_SENSITIVE, OCI_EXTRACT_UNIQUE_ABBREVS, or 
             OCI_EXTRACT_APPEND_VALUES. 
  input (IN) - Null-terminated input string.
  Related Functions
  
  OCIExtractToInt
  Name
  OCI Extract To Integer
  Purpose
  Gets the integer value for the specified key.
  Syntax
  sword OCIExtractToInt(dvoid *hndl, OCIError *err, OraText *keyname, 
                        uword valno, sb4 *retval);
  Comments
  The valno'th value (starting with 0) is returned.
  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. 
  OCI_NO_DATA means that there is no valno'th value for this key.
  Parameters
  hndl (IN) - The OCI environment or session handle.
  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
                 err and this function returns OCI_ERROR. Diagnostic information 
                 can be obtained by calling OCIErrorGet().
  keyname (IN) - Key name.
  valno (IN) - Which value to get for this key.
  retval (OUT) - The actual integer value.
  Related Functions
  
  OCIExtractToBool
  Name
  OCI Extract To Boolean
  Purpose
  Gets the boolean value for the specified key. 
  Syntax
  sword OCIExtractToBool(dvoid *hndl, OCIError *err, OraText *keyname, 
                         uword valno, ub1 *retval);
  Comments
  The valno'th value (starting with 0) is returned.
  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. 
  OCI_NO_DATA means that there is no valno'th value for this key.
  Parameters
  hndl (IN) - The OCI environment or session handle.
  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
                 err and this function returns OCI_ERROR. Diagnostic information 
                 can be obtained by calling OCIErrorGet().
  keyname (IN) - Key name.
  valno (IN) - Which value to get for this key.
  retval (OUT) - The actual boolean value.
  Related Functions
  
  OCIExtractToStr
  Name
  OCI Extract To String
  Purpose
  Gets the string value for the specified key.
  Syntax
  sword OCIExtractToStr(dvoid *hndl, OCIError *err, OraText *keyname, 
                        uword valno, OraText *retval, uword buflen);
  Comments
  The valno'th value (starting with 0) is returned.
  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. 
  OCI_NO_DATA means that there is no valno'th value for this key.
  Parameters
  hndl (IN) - The OCI environment or session handle.
  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
                 err and this function returns OCI_ERROR. Diagnostic information 
                 can be obtained by calling OCIErrorGet().
  keyname (IN) - Key name.
  valno (IN) - Which value to get for this key.
  retval (OUT) - The actual null-terminated string value.
  buflen (IN) - The length of the buffer for retval.
  Related Functions
  
  Note: The following OCIExtract functions are unavailable in this release
  
  OCIExtractToOCINum
  Name
  OCI Extract To OCI Number
  Purpose
  Gets the OCINumber value for the specified key.
  Syntax
  sword OCIExtractToOCINum(dvoid *hndl, OCIError *err, OraText *keyname, 
                           uword valno, OCINumber *retval);
  Comments
  The valno'th value (starting with 0) is returned.
  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. 
  OCI_NO_DATA means that there is no valno'th value for this key.
  Parameters
  hndl (IN) - The OCI environment or session handle.
  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
                 err and this function returns OCI_ERROR. Diagnostic information 
                 can be obtained by calling OCIErrorGet().
  keyname (IN) - Key name.
  valno (IN) - Which value to get for this key.
  retval (OUT) - The actual OCINumber value.
  Related Functions
  
  OCIExtractToList
  Name
  OCI Extract To parameter List
  Purpose
  Generates a list of parameters from the parameter structures that are stored 
  in memory. 
  Syntax
  sword OCIExtractToList(dvoid *hndl, OCIError *err, uword *numkeys);
  Comments
  Must be called before OCIExtractValues() is called.
  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
  Parameters
  hndl (IN) - The OCI environment or session handle.
  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
                 err and this function returns OCI_ERROR. Diagnostic information 
                 can be obtained by calling OCIErrorGet().
  numkeys (OUT) - Number of distinct keys stored in memory.
  Related Functions
  OCIExtractFromList()
  
  OCIExtractFromList
  Name
  OCI Extract From parameter List
  Purpose
  Generates a list of values for the a parameter in the parameter list.
  Syntax
  sword OCIExtractFromList(dvoid *hndl, OCIError *err, uword index, 
                           OraText *name, ub1 *type, uword *numvals, 
                           dvoid ***values);
  Comments
  Parameters are specified by an index. OCIExtractToList() must be called prior 
  to calling this routine to generate the parameter list from the parameter 
  structures that are stored in memory. 
  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
  Parameters
  hndl (IN) - The OCI environment or session handle.
  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
                 err and this function returns OCI_ERROR. Diagnostic information 
                 can be obtained by calling OCIErrorGet().
  name (OUT) - Name of the key for the current parameter.
  type (OUT) - Type of the current parameter (OCI_EXTRACT_TYPE_STRING, 
               OCI_EXTRACT_TYPE_INTEGER, OCI_EXTRACT_TYPE_OCINUM, or 
               OCI_EXTRACT_TYPE_BOOLEAN)
  numvals (OUT) - Number of values for this parameter.
  values (OUT) - The values for this parameter.
  Related Functions
  OCIExtractToList()
  
  
  ************************  OCIFileClose() ***********************************
   
  Name
   OCIFileClose - Oracle Call Interface FILE i/o CLOSE
  
  Purpose
   Close a previously opened file.
  
  Syntax
   sword OCIFileClose ( dvoid             *hndl, 
                        OCIError          *err,
                        OCIFileObject     *filep )
  
  Comments
   This function will close a previously opened file. If the function succeeds
   then OCI_SUCCESS will be returned, else OCI_ERROR. 
   
  Parameters
   hndl  (IN) - the OCI environment or session handle.
   err (OUT) - the OCI error handle
   filep (IN) - the OCIFile file object
  
  Related Functions
   OCIFileOpen.  
  
  
  
  ********************* OCIFileExists() **************************************
  
  Name
   OCIFileExists - Oracle Call Interface FILE i/o EXIST
  
  Purpose
   Check to see if the file exists.
  
  Syntax
   sword OCIFileExists ( dvoid           *hndl, 
                        OCIError         *err, 
                        OraText          *filename,
                        OraText          *path,
                        ub1              *flag )
  
  Comments
   This function will set the flag to TRUE if the file exists else it will
   be set to FALSE.
   The function will return OCI_ERROR if any error is encountered, else
   it will return OCI_ERROR. 
  
  Parameters
   hndl(IN) - OCI environment or session handle
   err(OUT) - OCI error handle
   filename(IN) - filename
   path(IN) - path of the file
   flag(OUT) - whether the file exists or not
  
  Related Functions.
   None.
       
  
   **************************** OCIFileFlush() ******************************
  
  
  Name
   OCIFileFlush - Oracle Call Interface File i/o FLUSH
  
  Purpose
   Flush the buffers associated with the file to the disk.
  
  Syntax
   sword OCIFileFlush ( dvoid             *hndl, 
                        OCIError          *err,
                        OCIFileObject     *filep )
  
  Comments
   The function will return OCI_ERROR if any error is encountered, else
   it will return OCI_ERROR.
  
  Parameters 
   hndl (IN) - the OCI environment or session handle.
   err (OUT) - the OCI error handle
   filep (IN) - the OCIFile file object
  
  Related Functions
   OCIFileOpen, OCIFileWrite
  
  
  
   *************************** OCIFileGetLength() ****************************
  
  Name
   OCIFileGetLength - Oracle Call Interface FILE i/o GET file LENGTH
  
  Purpose
   Get the length of a file.
  
  Syntax
   OCIFileGetLength(dvoid           *hndl, 
                    OCIError        *err,
                    OraText         *filename,
                    OraText         *path,
                    ubig_ora        *lenp )
  
  Comments
   The length of the file will be returned in lenp.
   The function will return OCI_ERROR if any error is encountered, else
   it will return OCI_ERROR.
   
  Parameters
   hndl (IN) - the OCI environment or session handle.
   err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
   in err and this function returns OCI_ERROR.  Diagnostic information can be 
   obtained by calling OCIErrorGet().
   filename (IN) - file name.
   path (IN) - path of the file.
   lenp (OUT) - On output, it is the length of the file in bytes.
   is the number of bytes in the file.
  
  Related Functions
   None.
  
  
  
  ******************************** OCIFileInit() *****************************
     
  Name
   OCIFileInit - Oracle Call Interface FILE i/o INITialize
  
  Purpose
   Initialize the OCI File I/O package and create the OCIFile context.
  
  Syntax
   sword OCIFileInit ( dvoid *hndl, 
                       OCIError *err)
  
  Comments
   This function should be called before any of the OCIFile functions are
   used.
   The function will return OCI_ERROR if any error is encountered, else
   it will return OCI_ERROR.
   
  Parameters
   hndl(IN) - OCI environment or session handle.
   err(OUT) - OCI error structure.
  
  Related Functions
   OCIFileTerm
       
  
  
  ********************************* OCIFileOpen() *****************************
  
  Name
   OCIFileOpen - Oracle Call Interface File i/o OPEN
  
  Purpose
       Open a file.
  
  Syntax
   sword OCIFileOpen ( dvoid               *hndl, 
                       OCIError            *err,
                       OCIFileObject      **filep,
                       OraText             *filename,
                       OraText             *path,
                       ub4                  mode,
                       ub4                  create, 
                       ub4                  type )
  
  Comments
   OCIFileOpen returns a handle to the open file in filep if the file is
   successfully opened. 
   If one wants to use the standard file objects (stdin, stdout & stderr)
   then OCIFileOpen whould be called with the type filed containing the 
   appropriate type (see the parameter type). If any of the standard files 
   are specified then filename, path, mode and create are ignored.
   The function will return OCI_ERROR if any error is encountered, else
   it will return OCI_ERROR.
  
  Parameters
   hndl (OUT) - the OCI environment or session handle.
   err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
   in err and this function returns OCI_ERROR.  Diagnostic information can be 
   obtained by calling OCIErrorGet().
   filep (OUT) - the file object to be returned.
   filename (IN) - file name (NULL terminated string).
   path (IN) - path of the file (NULL terminated string).
   mode - mode in which to open the file (valid modes are OCI_FILE_READONLY,
   OCI_FILE_WRITEONLY, OCI_FILE_READ_WRITE).
   create - should the file be created if it does not exist. Valid values
   are: 
       OCI_FILE_TRUNCATE - create a file regardless of whether or not it exists. 
                          If the file already exists overwrite it.
       OCI_FILE_EXIST - open it if it exists, else fail.
       OCI_FILE_EXCL - fail if the file exists, else create.
       OCI_FILE_CREATE - open the file if it exists, and create it if it doesn't.
       OCI_FILE_APPEND - set the file pointer to the end of the file prior to 
                        writing(this flag can be OR'ed with OCI_FILE_EXIST or
                        OCI_FILE_CREATE).
  type - file type. Valid values are OCI_FILE_TEXT, OCI_FILE_BIN, 
         OCI_FILE_STDIN, OCI_FILE_STDOUT and OCI_FILE_STDERR.
         If any of the standard files are specified then filename, path, mode
         and create are ignored.
  
  Related Functions.
   OCIFileClose
  
  
  
  ************************** OCIFileRead() ************************************
     
  Name
   OCIFileRead - Oracle Call Interface FILE i/o READ
  
  Purpose
   Read from a file into a buffer.
  
  Syntax
   sword OCIFileRead ( dvoid            *hndl, 
                       OCIError         *err,
                       OCIFileObject    *filep,
                       dvoid            *bufp,
                       ub4               bufl,
                       ub4              *bytesread )
  
  Comments
   Upto bufl bytes from the file will be read into bufp. The user should
   allocate memory for the buffer.
   The number of bytes read would be in bytesread.
   The function will return OCI_ERROR if any error is encountered, else
   it will return OCI_ERROR.
  
  Parameters
   hndl (IN) - the OCI environment or session handle.
   err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
   in err and this function returns OCI_ERROR.  Diagnostic information can be 
   obtained by calling OCIErrorGet().
   filep (IN/OUT) - a File Object that uniquely references the file.
   bufp (IN) - the pointer to a buffer into which the data will be read. The 
   length of the allocated memory is assumed to be bufl. 
   bufl - the length of the buffer in bytes. 
   bytesread (OUT) - the number of bytes read.
  
  Related Functions
   OCIFileOpen, OCIFileSeek, OCIFileWrite
  
  
  
  ****************************** OCIFileSeek() ******************************
  
  Name
   OCIFileSeek - Oracle Call Interface FILE i/o SEEK
  
  Purpose
   Perfom a seek to a byte position.
  
  Syntax
   sword OCIFileSeek ( dvoid           *hndl, 
                       OCIError        *err,  
                       OCIFileObject   *filep,
                       uword            origin,
                       ubig_ora         offset,
                       sb1              dir)
  
  Comments
   The function will return OCI_ERROR if any error is encountered, else
   it will return OCI_ERROR.
  
  Parameters
   hndl (IN) - the OCI environment or session handle.
   err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
   in err and this function returns OCI_ERROR.  Diagnostic information can be 
   obtained by calling OCIErrorGet().
   filep (IN/OUT) - a file handle that uniquely references the file.
   origin - The starting point we want to seek from. NOTE: The starting 
   point may be OCI_FILE_SEEK_BEGINNING (beginning), OCI_FILE_SEEK_CURRENT 
   (current position), or OCI_FILE_SEEK_END (end of file). 
   offset - The number of bytes from the origin we want to start reading from. 
   dir - The direction we want to go from the origin. NOTE: The direction 
   can be either OCI_FILE_FORWARD or OCI_FILE_BACKWARD. 
   
  Related Function
   OCIFileOpen, OCIFileRead, OCIFileWrite
  
  
  
  *************************** OCIFileTerm() **********************************
  
  Name
   OCIFileTerm - Oracle Call Interface FILE i/o TERMinate
  
  Purpose
   Terminate the OCI File I/O package and destroy the OCI File context.
  
  Syntax
   sword OCIFileTerm ( dvoid *hndl, 
                       OCIError *err )
  
  Comments
   After this function has been called no OCIFile function should be used.
   The function will return OCI_ERROR if any error is encountered, else
   it will return OCI_ERROR.
   
  Parameters
   hndl(IN) - OCI environment or session handle.
   err(OUT) - OCI error structure. 
    
  Related Functions 
   OCIFileInit   
   
  
  ********************************* OCIFileWrite() **************************** 
  
  Name 
   OCIFileWrite - Oracle Call Interface FILE i/o WRITE
  
  Purpose
    Write data from buffer into a file.
  
  Syntax
   sword OCIFileWrite ( dvoid            *hndl, 
                        OCIError         *err,  
                        OCIFileObject    *filep,
                        dvoid            *bufp, 
                        ub4               buflen
                        ub4              *byteswritten )
  
  Comments
   The number of bytes written will be in *byteswritten.
   The function will return OCI_ERROR if any error is encountered, else
   it will return OCI_ERROR.
  
  Parameters
   hndl (IN) - the OCI environment or session handle.
   err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
   in err and this function returns OCI_ERROR.  Diagnostic information can be 
   obtained by calling OCIErrorGet().
   filep (IN/OUT) - a file handle that uniquely references the file.
   bufp (IN) - the pointer to a buffer from which the data will be written. 
   The length of the allocated memory is assumed to be the value passed
   in bufl. 
   bufl - the length of the buffer in bytes.
   byteswritten (OUT) - the number of bytes written.
   
  Related Functions
   OCIFileOpen, OCIFileSeek, OCIFileRead 
  
  
  
  
  
  OCIHandleAlloc() 
  Name
  OCI Get HaNDLe
  Purpose
  This call returns a pointer to an allocated and initialized handle.
  Syntax
  sword OCIHandleAlloc ( CONST dvoid   *parenth,
                       dvoid         **hndlpp, 
                       ub4           type, 
                       size_t        xtramem_sz,
                       dvoid         **usrmempp);
  Comments
  Returns a pointer to an allocated and initialized structure, corresponding to 
  the type specified in type. A non-NULL handle is returned on success. Bind 
  handle and define handles are allocated with respect to a statement handle. All
  other handles are allocated with respect to an environment handle which is 
  passed in as a parent handle.
  No diagnostics are available on error. This call returns OCI_SUCCESS if 
  successful, or OCI_INVALID_HANDLE if an out-of-memory error occurs.
  Handles must be allocated using OCIHandleAlloc() before they can be passed 
  into an OCI call.
  Parameters
  parenth (IN) - an environment or a statement handle. 
  hndlpp (OUT) - returns a handle to a handle type. 
  type (IN) - specifies the type of handle to be allocated. The specific types 
  are: 
  OCI_HTYPE_ERROR - specifies generation of an error report handle of 
  C type OCIError
  OCI_HTYPE_SVCCTX - specifies generation of a service context handle 
  of C type OCISvcCtx
  OCI_HTYPE_STMT - specifies generation of a statement (application 
  request) handle of C type OCIStmt
  OCI_HTYPE_BIND - specifies generation of a bind information handle 
  of C type OCIBind
  OCI_HTYPE_DEFINE - specifies generation of a column definition 
  handle of C type OCIDefine
  OCI_HTYPE_DESCRIBE  - specifies generation of a select list 
  description handle of C type OCIDesc
  OCI_HTYPE_SERVER - specifies generation of a server context handle 
  of C type OCIServer
  OCI_HTYPE_SESSION - specifies generation of an authentication 
  context handle of C type OCISession
  OCI_HTYPE_TRANS - specifies generation of a transaction context
  handle of C type OCITrans
  OCI_HTYPE_COMPLEXOBJECT - specifies generation of a complex 
  object retrieval handle of C type OCIComplexObject
  OCI_HTYPE_SECURITY - specifies generation of a security handle of C 
  type OCISecurity
  xtramem_sz (IN) - specifies an amount of user memory to be allocated.
  usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz 
  allocated by the call for the user. 
  Related Functions
  OCIHandleFree()
  
  
  
  OCIHandleFree()
  Name
  OCI Free HaNDLe
  Purpose
  This call explicitly deallocates a handle.
  Syntax
  sword OCIHandleFree ( dvoid     *hndlp,
                      ub4       type);
  Comments
  This call frees up storage associated with a handle, corresponding to the type 
  specified in the type parameter.
  This call returns either OCI_SUCCESS or OCI_INVALID_HANDLE.
  All handles must be explicitly deallocated. OCI will not deallocate a child 
  handle if the parent is deallocated.
  Parameters
  hndlp (IN) - an opaque pointer to some storage.
  type (IN) - specifies the type of storage to be allocated. The specific types 
  are:
  OCI_HTYPE_ENV - an environment handle
  OCI_HTYPE_ERROR - an error report handle
  OCI_HTYPE_SVCCTX - a service context handle
  OCI_HTYPE_STMT - a statement (application request) handle
  OCI_HTYPE_BIND - a bind information handle
  OCI_HTYPE_DEFINE - a column definition handle
  OCI_HTYPE_DESCRIBE  - a select list description handle
  OCI_HTYPE_SERVER - a server handle
  OCI_HTYPE_SESSION - a user authentication handle
  OCI_HTYPE_TRANS - a transaction handle
  OCI_HTYPE_COMPLEXOBJECT - a complex object retrieval handle
  OCI_HTYPE_SECURITY - a security handle
  Related Functions
  OCIHandleAlloc()
  
  
  
  
  OCIInitialize()
  Name
  OCI Process Initialize
  Purpose
  Initializes the OCI process environment.
  Syntax
  sword OCIInitialize ( ub4           mode,
                      CONST dvoid   *ctxp, 
                      CONST dvoid   *(*malocfp) 
                                    ( dvoid *ctxp,
                                      size_t size ),
                      CONST dvoid   *(*ralocfp)
                                    ( dvoid *ctxp,
                                      dvoid *memp,
                                      size_t newsize ),
                      CONST void    (*mfreefp)
                                    ( dvoid *ctxp,
                                      dvoid *memptr ));
  Comments
  This call initializes the OCI process environment.
  OCIInitialize() must be invoked before any other OCI call. 
  Parameters
  mode (IN) - specifies initialization of the mode. The valid modes are:
  OCI_DEFAULT - default mode.
  OCI_THREADED - threaded environment. In this mode, internal data 
  structures are protected from concurrent accesses by multiple threads. 
  OCI_OBJECT - will use navigational object interface. 
  ctxp (IN) - user defined context for the memory call back routines. 
  malocfp (IN) - user-defined memory allocation function. If mode is 
  OCI_THREADED, this memory allocation routine must be thread safe.
  ctxp - context pointer for the user-defined memory allocation function.
  size - size of memory to be allocated by the user-defined memory 
  allocation function
  ralocfp (IN) - user-defined memory re-allocation function. If mode is 
  OCI_THREADED, this memory allocation routine must be thread safe.
  ctxp - context pointer for the user-defined memory reallocation 
  function.
  memp - pointer to memory block
  newsize - new size of memory to be allocated
  mfreefp (IN) - user-defined memory free function. If mode is 
  OCI_THREADED, this memory free routine must be thread safe.
  ctxp - context pointer for the user-defined memory free function.
  memptr - pointer to memory to be freed
  Example
  See the description of OCIStmtPrepare() on page 13-96 for an example showing 
  the use of OCIInitialize().
  Related Functions
  
  -------------------------------OCITerminate------------------------------------
  
  OCITerminate()
  Name
  OCI process Terminate
  Purpose
  Do cleanup before process termination
  Syntax
  sword OCITerminate (ub4 mode);
  
  Comments
  This call performs  OCI related clean up before the OCI process terminates.
  If the process is running in shared mode then the OCI process is disconnected
  from the shared memory subsystem.
  
  OCITerminate() should be the last OCI call in any process.
  
  Parameters
  mode (IN) - specifies different termination modes.
  
  OCI_DEFAULT - default mode.
  
  Example
  
  Related Functions
  OCIInitialize()
  
  ------------------------ OCIAppCtxSet--------------------------------------
  Name
  OCI Application context Set
  Purpose
  Set an attribute and its value for a particular application context 
       namespace
  Syntax
   (sword) OCIAppCtxSet((void *) sesshndl, (dvoid *)nsptr,(ub4) nsptrlen,
                       (dvoid *)attrptr, (ub4) attrptrlen, (dvoid *)valueptr,
                       (ub4) valueptrlen,  errhp, (ub4)mode);
  
  Comments
  Please note that the information set on the session handle is sent to the server during the next OCIStatementExecute or OCISessionBegin.
  
  This information is cleared from the session handle, once the information 
   has been sent over to the server,and should be setup again if needed.
  
  Parameters
   sesshndl   (IN/OUT) - Pointer to a session handle
   nsptr      (IN)     - Pointer to namespace string
   nsptrlen   (IN)     - length of the nsptr
   attrptr    (IN)     - Pointer to attribute string
   attrptrlen (IN)     - length of the attrptr
   valueptr   (IN)     - Pointer to value string
   valueptrlen(IN)     - length of the valueptr
   errhp      (OUT)    - Error from the API
   mode       (IN)     - mode of operation (OCI_DEFAULT)
  
  Returns
   error if any 
  Example
  
  Related Functions
     OCIAppCtxClearAll
  
  
  ------------------------ OCIAppCtxClearAll---------------------------------
  Name
   OCI Application Context Clear all attributes in a namespace
  Purpose
   To clear the  values all attributes in a namespace
  Syntax
   (sword) OCIAppCtxClearAll((void *) sesshndl, (dvoid *)nsptr, (ub4) nsptrlen,
                (OCIError *)errhp, (ub4)mode);
  
  Comments
  This will clean up the context information on the server side during the next piggy-back to the server.
  
  Parameters
   sesshndl (IN/OUT) - Pointer to a session handle
   nsptr    (IN)     - Pointer to namespace string where the values of all
                       attributes are cleared
   nsptrlen (IN)     - length of the nsptr
   errhp    (OUT)    - Error from the API 
   mode     (IN)     - mode of operation (OCI_DEFAULT)
  Example
  
  Returns
   error if any
  
  Related Functions
   OCIAppCtxSet
  ---------------------- OCIIntervalAssign --------------------------------- 
  sword OCIIntervalAssign(dvoid *hndl, OCIError *err, 
                      CONST OCIInterval *inpinter, OCIInterval *outinter );
  
    DESCRIPTION
      Copies one interval to another to create a replica
    PARAMETERS
       hndl (IN) - Session/Env handle.
      err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
      (IN)  inpinter - Input Interval 
      (OUT) outinter - Output Interval 
    RETURNS
       OCI_INVALID_HANDLE if 'err' is NULL.
       OCI_SUCCESS otherwise
  
   ---------------------- OCIIntervalCheck ------------------------------------ 
  sword OCIIntervalCheck(dvoid *hndl, OCIError *err, CONST OCIInterval *interval,
                           ub4 *valid );
  
    DESCRIPTION
      Checks the validity of an interval
    PARAMETERS
       hndl (IN) - Session/Env handle.
      err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
      (IN)  interval - Interval to be checked 
      (OUT) valid     - Zero if the interval is valid, else returns an Ored
          combination of the following codes.
  
     Macro name                   Bit number      Error
     ----------                   ----------      -----
     OCI_INTER_INVALID_DAY         0x1           Bad day
     OCI_INTER_DAY_BELOW_VALID     0x2           Bad DAy Low/high bit (1=low)
     OCI_INTER_INVALID_MONTH       0x4           Bad MOnth
     OCI_INTER_MONTH_BELOW_VALID   0x8           Bad MOnth Low/high bit (1=low)
     OCI_INTER_INVALID_YEAR        0x10          Bad YeaR
     OCI_INTER_YEAR_BELOW_VALID    0x20          Bad YeaR Low/high bit (1=low)
     OCI_INTER_INVALID_HOUR        0x40          Bad HouR
     OCI_INTER_HOUR_BELOW_VALID    0x80          Bad HouR Low/high bit (1=low)
     OCI_INTER_INVALID_MINUTE      0x100         Bad MiNute
     OCI_INTER_MINUTE_BELOW_VALID  0x200         Bad MiNute Low/high bit(1=low)
     OCI_INTER_INVALID_SECOND      0x400         Bad SeCond
     OCI_INTER_SECOND_BELOW_VALID  0x800         bad second Low/high bit(1=low)
     OCI_INTER_INVALID_FRACSEC     0x1000        Bad Fractional second
     OCI_INTER_FRACSEC_BELOW_VALID 0x2000        Bad fractional second Low/High
  
          
    RETURNS
      OCI_SUCCESS if interval is okay
      OCI_INVALID_HANDLE if 'err' is NULL.
  
   ---------------------- OCIIntervalCompare ----------------------------------- 
  sword OCIIntervalCompare(dvoid *hndl, OCIError *err, OCIInterval *inter1, 
                          OCIInterval *inter2, sword *result );
  
    DESCRIPTION
          Compares two intervals, returns 0 if equal, -1 if inter1 < inter2, 
          1 if inter1 > inter2
    PARAMETERS
       hndl (IN) - Session/Env handle. 
       err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
       inter1  (IN)   - Interval to be compared 
       inter2  (IN)   - Interval to be compared 
       result  (OUT)  -   comparison result, 0 if equal, -1 if inter1 < inter2, 
                          1 if inter1 > inter2
  
    RETURNS
       OCI_SUCCESS on success
       OCI_INVALID_HANDLE if 'err' is NULL.
       OCI_ERROR if 
          the two input datetimes are not mutually comparable.
  
  ---------------------- OCIIntervalDivide ------------------------------------ 
  sword OCIIntervalDivide(dvoid *hndl, OCIError *err, OCIInterval *dividend, 
                  OCINumber *divisor, OCIInterval *result );
   
    DESCRIPTION
       Divides an interval by an Oracle Number to produce an interval
    PARAMETERS
          hndl (IN) - Session/Env handle. 
       err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
       dividend  (IN)   - Interval to be divided 
       divisor   (IN)   - Oracle Number dividing `dividend' 
       result    (OUT)  - resulting interval (dividend / divisor) 
    RETURNS
       OCI_SUCCESS on success
       OCI_INVALID_HANDLE if 'err' is NULL.
  
   ---------------------- OCIIntervalFromNumber -------------------- 
  sword OCIIntervalFromNumber(dvoid *hndl, OCIError *err, 
                 OCIInterval *inter, OCINumber *number);
    DESCRIPTION
      Converts an interval to an Oracle Number
    PARAMETERS
       hndl (IN) - Session/Env handle. 
      err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
      (OUT)  interval - Interval to be converted 
      (IN) number - Oracle number result  (in years for YEARMONTH interval
                       and in days for DAYSECOND)
    RETURNS
      OCI_SUCCESS on success 
      OCI_INVALID_HANDLE if 'err' is NULL.
      OCI_ERROR on error.
    NOTES
      Fractional portions of the date (for instance, minutes and seconds if
      the unit chosen is hours) will be included in the Oracle number produced.
      Excess precision will be truncated.
   
   ---------------------- OCIIntervalFromText --------------------------------- 
  sword OCIIntervalFromText( dvoid *hndl, OCIError *err, CONST OraText *inpstr, 
                  size_t str_len, OCIInterval *result );
  
    DESCRIPTION
      Given an interval string produce the interval represented by the string.
      The type of the interval is the type of the 'result' descriptor.
    PARAMETERS
  
       hndl (IN) - Session/Env handle. 
       err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
      (IN)  inpstr - Input string 
      (IN)  str_len - Length of input string 
      (OUT) result - Resultant interval 
    RETURNS
      OCI_SUCCESS on success
      OCI_INVALID_HANDLE if 'err' is NULL.
      OCI_ERROR if
          there are too many fields in the literal string
          the year is out of range (-4713 to 9999)
          if the month is out of range (1 to 12)
          if the day of month is out of range (1 to 28...31)
          if hour is not in range (0 to 23)
          if hour is not in range (0 to 11)
          if minute is not in range (0 to 59)
          if seconds in minute not in range (0 to 59)
          if seconds in day not in range (0 to 86399)
          if the interval is invalid
  
  
   ---------------------- OCIIntervalGetDaySecond -------------------- 
  
    DESCRIPTION
       Gets values of day second interval
    PARAMETERS
          hndl (IN) - Session/Env handle.
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().     
          day     (OUT) - number of days
          hour    (OUT) - number of hours
          min     (OUT) - number of mins
          sec     (OUT) - number of secs
          fsec    (OUT) - number of fractional seconds
          result     (IN)  - resulting interval 
    RETURNS
          OCI_SUCCESS on success
          OCI_INVALID_HANDLE if 'err' is NULL.
  
  
   ---------------------- OCIIntervalGetYearMonth -------------------- 
  
    DESCRIPTION
       Gets year month from an interval
    PARAMETERS
          hndl (IN) - Session/Env handle.
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().     
          year    (OUT)   - year value
          month   (OUT)   - month value
          result     (IN)  - resulting interval 
    RETURNS
          OCI_SUCCESS on success
          OCI_INVALID_HANDLE if 'err' is NULL.
  
  
  
  -------------------------- OCIIntervalAdd ------------------------------
  sword OCIIntervalAdd(dvoid *hndl, OCIError *err, OCIInterval *addend1, 
                          OCIInterval *addend2, OCIInterval *result );
  NAME OCIIntervalAdd - Adds two intervals 
  PARAMETERS
  hndl (IN) - Session/Env handle. 
  err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
  addend1  (IN)   - Interval to be added 
  addend2  (IN)   - Interval to be added 
  result   (OUT)  - resulting interval (addend1 + addend2) 
  DESCRIPTION
       Adds two intervals to produce a resulting interval
  RETURNS
       OCI_SUCCESS on success
       OCI_ERROR if:
          the two input intervals are not mutually comparable.
          the resulting year would go above SB4MAXVAL
          the resulting year would go below SB4MINVAL
       OCI_INVALID_HANDLE if 'err' is NULL.
  NOTES
       The two input intervals must be mutually comparable
  
   ---------------------- OCIIntervalSubtract ------------------------------- 
  sword OCIIntervalSubtract(dvoid *hndl, OCIError *err, OCIInterval *minuend, 
                              OCIInterval *subtrahend, OCIInterval *result );
  NAME - OCIIntervalSubtract - subtracts two intervals
  PARAMETERS
  hndl (IN) - Session/Env handle.
  err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().     
  minuend    (IN)   - interval to be subtracted from 
  subtrahend (IN)   - interval subtracted from minuend 
  result     (OUT)  - resulting interval (minuend - subtrahend) 
  DESCRIPTION
       Subtracts two intervals and stores the result in an interval
  RETURNS
          OCI_SUCCESS on success
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if:
             the two input intervals are not mutually comparable.
             the resulting leading field would go below SB4MINVAL 
             the resulting leading field would go above SB4MAXVAL
  
  ---------------------- OCIIntervalMultiply --------------------------------- 
  sword OCIIntervalMultiply(dvoid *hndl, OCIError *err, CONST OCIInterval *inter,
                          OCINumber *nfactor, OCIInterval *result );
  
    DESCRIPTION
       Multiplies an interval by an Oracle Number to produce an interval
    PARAMETERS
          hndl (IN) - Session/Env handle. 
       err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
       inter  (IN)   - Interval to be multiplied 
       nfactor  (IN)   - Oracle Number to be multiplied 
       result   (OUT)  - resulting interval (ifactor * nfactor) 
    RETURNS
       OCI_SUCCESS on success
       OCI_INVALID_HANDLE if 'err' is NULL.
       OCI_ERROR if:
          the resulting year would go above SB4MAXVAL
          the resulting year would go below SB4MINVAL
  
  
   ---------------------- OCIIntervalSetDaySecond -------------------- 
  
    DESCRIPTION
       Sets day second interval
    PARAMETERS
          hndl (IN) - Session/Env handle.
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().     
          day     (IN) - number of days
          hour    (IN) - number of hours
          min     (IN) - number of mins
          sec     (IN) - number of secs
          fsec    (IN) - number of fractional seconds
          result     (OUT)  - resulting interval 
    RETURNS
          OCI_SUCCESS on success
          OCI_INVALID_HANDLE if 'err' is NULL.
  
  
   ---------------------- OCIIntervalSetYearMonth -------------------- 
  
    DESCRIPTION
       Sets year month interval
    PARAMETERS
          hndl (IN) - Session/Env handle.
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().     
          year    (IN)   - year value
          month   (IN)   - month value
          result     (OUT)  - resulting interval 
    RETURNS
          OCI_SUCCESS on success
          OCI_INVALID_HANDLE if 'err' is NULL.
  
  
  ----------------------- OCIIntervalToNumber ---------------------------------
  sword OCIIntervalToNumber(dvoid *hndl, OCIError *err, CONST OCIInterval *inter,
                            OCINumber *number);
  
    DESCRIPTION
      Converts an interval to an Oracle Number
    PARAMETERS
       hndl (IN) - Session/Env handle. 
      err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
      (IN)  inter - Interval to be converted 
      (OUT) number - Oracle number result  (in years for YEARMONTH interval
                       and in days for DAYSECOND)
    RETURNS
      OCI_INVALID_HANDLE if 'err' is NULL.
      OCI_SUCCESS on success 
    NOTES
      Fractional portions of the date (for instance, minutes and seconds if
      the unit chosen is hours) will be included in the Oracle number produced.
      Excess precision will be truncated.
   
  ------------------------------- OCIIntervalToText -------------------------
  sword OCIIntervalToText( dvoid *hndl, OCIError *err, CONST OCIInterval *inter,
                          ub1 lfprec, ub1 fsprec, OraText *buffer, 
                          size_t buflen, size_t *resultlen );
  
    DESCRIPTION
      Given an interval, produces a string representing the interval.
    PARAMETERS
       hndl (IN) - Session/Env handle. 
      err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
      (IN)  inter - Interval to be converted 
      (IN)  lfprec  - Leading field precision. Number of digits used to
                  represent the leading field.
      (IN)  fsprec  - Fractional second precision of the interval. Number of
                  digits used to represent the fractional seconds.
      (OUT) buffer - buffer to hold result 
      (IN)  buflen - length of above buffer 
      (OUT) resultlen - length of result placed into buffer 
   
    RETURNS
      OCI_SUCCESS on success
      OCI_INVALID_HANDLE if 'err' is NULL.
      OCI_ERROR 
          if the buffer is not large enough to hold the result
    NOTES
      The interval literal will be output as `year' or `[year-]month' for
      YEAR-MONTH intervals and as `seconds' or `minutes[:seconds]' or
      `hours[:minutes[:seconds]]' or `days[ hours[:minutes[:seconds]]]' for
      DAY-TIME intervals (where optional fields are surrounded by brackets).
  
   ---------------------- OCIIntervalFromTZ -------------------- 
  sword OCIIntervalFromTZ(dvoid *hndl, OCIError *err, CONST oratext *inpstring,
                          size_t str_len, OCIInterval *result);
  
    DESCRIPTION
      Retuns an OCI_DTYPE_INTERVAL_DS OCIInterval with the region id (if
      the region is specified in the input string) set and the current
      absolute offset or an absolut offset with the region id set to 0.
    PARAMETERS
      hndl (IN) - Session/Env handle.
      err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
      inpstring (IN) - pointer to the input string
      str_len (IN) - inpstring length
      result - Output Interval 
    RETURNS
       OCI_SUCCESS on success
       OCI_INVALID_HANDLE if 'err' is NULL.
       OCI_ERROR on error
          Bad interval type
          Timezone errors
    NOTES
       The input string must be of the form [+/-]TZH:TZM or 'TZR [TZD]'
  
   ----------------------- OCIKerbAttrSet ---------------------
  sword OCIKerbAttrSet(OCISession *trgthndlp, ub4 auth_mode, 
                       ub1 *ftgt_ticket, ub4 ftgt_ticket_len, 
                       ub1 *ftgt_sesskey, ub4 ftgt_sesskey_len, 
                       ub2 ftgt_keytype, ub4 ftgt_ticket_flags, 
                       sb4 ftgt_auth_time, sb4 ftgt_start_time, 
                       sb4 ftgt_end_time, sb4 ftgt_renew_time, 
                       text *ftgt_principal, ub4 ftgt_principal_len,
                       text *ftgt_realm, ub4 ftgt_realm_len, 
                       OCIError *errhp);
  
    DESCRIPTION
      This call sets the attributes required for Kerberos authentication
      on the user handle.
  
    PARAMETERS
      trgthndlp (IN) - The pointer to a user handle.
      auth_mode (IN) - Indicates what type of Kerberos credentials should
                      be set. Options are:
  
                      OCI_KERBCRED_PROXY 
                                           - Set Kerberos credentials for use with
                                             proxy authentication.
                      OCI_KERBCRED_CLIENT_IDENTIFIER 
                                           - Set Kerberos credentials for use
                                             with secure client identifier.
  
      ftgt_ticket (IN) - Forwardable Ticket Granting Ticket (FTGT).
      ftgt_ticket_len (IN) - Length of FTGT.
      ftgt_sesskey(IN) - Session Key associated with FTGT.
      ftgt_sesskey_len (IN) - Length of session key.
      ftgt_keytype (IN) -  Type of encryption key used to encrypt FTGT.
      ftgt_ticket_flags (IN) - Flags associated with  encryption of FTGT.
      ftgt_auth_time (IN) - Authentication time compatible with that in FTGT.
      ftgt_start_time (IN) - Start time compatible with that indicated in FTGT.
      ftgt_end_time (IN) - End time compatible with that indicated in FTGT.
      ftgt_renew_time (IN) - Renew time compatible with that indicated in FTGT.
      ftgt_principal (IN) - Client principal name from FTGT.
      ftgt_principal_len (IN) - Length of client principal name.
      ftgt_realm (IN) - Client realm name from FTGT.
      ftgt_realm_len (IN) - Client realm name length.
      errhp (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
    RETURNS
       OCI_SUCCESS on success
       OCI_ERROR on error
    NOTES
  
  OCILdaToSvcCtx()
  Name
  OCI toggle version 7 Lda_Def to SerVice context handle
  Purpose
  Converts a V7 Lda_Def to a V8 service context handle.
  Syntax
  sword OCILdaToSvcCtx ( OCISvcCtx  **svchpp,
                       OCIError   *errhp,
                       Lda_Def    *ldap );
  Comments
  Converts a V7 Lda_Def to a V8 service context handle. The action of this call 
  can be reversed by passing the resulting service context handle to the 
  OCISvcCtxToLda() function.
  Parameters
  svchpp (IN/OUT) - the service context handle. 
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  ldap (IN/OUT) - the V7 logon data area returned by OCISvcCtxToLda() from 
  this service context.
  Related Functions
  OCISvcCtxToLda()
  
  
  
  
  OCILobAppend()
  
  Name
  OCI Lob APpend
  
  Purpose
  Appends a LOB value at the end of another LOB. 
  
  Syntax
  sword OCILobAppend ( OCISvcCtx        *svchp,
                     OCIError         *errhp,
                     OCILobLocator    *dst_locp,
                     OCILobLocator    *src_locp );
  Comments
  Appends a LOB value at the end of LOB. The data is 
  copied from the source to the destination at the end of the destination. The 
  source and the destination must already exist. The destination LOB is 
  extended to accommodate the newly written data.
  
  It is an error to extend the destination LOB beyond the maximum length 
  allowed or to try to copy from a NULL LOB. 
  
  Parameters
  svchp (IN) - the service context handle. 
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error. 
  dst_locp (IN/OUT) - a locator uniquely referencing the destination LOB. 
  src_locp (IN/OUT) - a locator uniquely referencing the source LOB. 
  
  Related Functions
  OCILobTrim()
  OCIErrorGet()
  OCILobWrite()
  OCILobCopy()
  
  
  
  OCILobAssign()
  
  Name
  OCI Lob ASsiGn
  
  Purpose
  Assigns one LOB/FILE locator to another.
  
  Syntax
  sword OCILobAssign ( OCIEnv                *envhp, 
                       OCIError              *errhp, 
                       CONST OCILobLocator   *src_locp, 
                       OCILobLocator         **dst_locpp );
  
  Comments
  Assign source locator to destination locator.  After the assignment, both 
  locators refer to the same LOB data.  For internal LOBs, the source locator's 
  LOB data gets copied to the destination locator's LOB data only when the 
  destination locator gets stored in the table.  Therefore, issuing a flush of 
  the object containing the destination locator will copy the LOB data. For 
  FILEs only the locator that refers to the OS file is copied to the table. The
  OS file is not copied.
  Note: The only difference between this and OCILobLocatorAssign is that this
  takes an environment handle whereas OCILobLocatorAssign takes an OCI service
  handle
  
  Parameters
  envhp (IN/OUT) - OCI environment handle initialized in object mode.
  errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded 
  in errhp and this function returns OCI_ERROR. Diagnostic information can be 
  obtained by calling OCIErrorGet().
  src_locp (IN) - LOB locator to copy from.
  dst_locpp (IN/OUT) - LOB locator to copy to.  The caller must allocate space 
  for the OCILobLocator by calling OCIDescriptorAlloc().
  
  See also
  OCIErrorGet()
  OCILobIsEqual()
  OCILobLocatorIsInit()
  OCILobLocatorAssign()
  
  
  OCILobCharSetForm()
  
  Name
  OCI Lob Get Character Set Form
  
  Purpose
  Gets the LOB locator's character set fpr,, if any.
  
  Syntax
  sword OCILobCharSetForm ( OCIEnv                    *envhp, 
                            OCIError                  *errhp, 
                            CONST OCILobLocator       *locp, 
                            ub1                       *csfrm );
  
  Comments
  Returns the character set form of the input LOB locator in the csfrm output 
  parameter. 
  
  Parameters
  envhp (IN/OUT) - OCI environment handle initialized in object mode.
  errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it 
  is recorded in err and this function returns OCI_ERROR. Diagnostic 
  information can be obtained by calling OCIErrorGet().
  locp (IN) - LOB locator for which to get the character set form.
  csfrm(OUT) - character set form of the input LOB locator.  If the input 
  locator is for a BLOB or a BFILE, csfrm is set to 0 since there is no concept 
  of a character set for binary LOBs/FILEs.  The caller must allocate space for 
  the csfrm (ub1) and not write into the space.
  See also
  OCIErrorGet(), OCILobCharSetId(), OCILobLocatorIsInit
  
  
  
  OCILobCharSetId()
  
  Name
  OCI Lob get Character Set IDentifier
  
  Purpose
  Gets the LOB locator's character set ID, if any.
  
  Syntax
  sword OCILobCharSetId ( OCIEnv                    *envhp, 
                          OCIError                  *errhp, 
                          CONST OCILobLocator       *locp, 
                          ub2                       *csid );
  
  Comments
  Returns the character set ID of the input LOB locator in the cid output 
  parameter. 
  
  Parameters
  envhp (IN/OUT) - OCI environment handle initialized in object mode.
  errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it 
  is recorded in err and this function returns OCI_ERROR. Diagnostic 
  information can be obtained by calling OCIErrorGet().
  locp (IN) - LOB locator for which to get the character set ID.
  csid (OUT) - character set ID of the input LOB locator.  If the input locator 
  is for a BLOB or a BFILE, csid is set to 0 since there is no concept of a 
  character set for binary LOBs/FILEs.  The caller must allocate space for the 
  character set id of type ub2 and not write into the space.
  
  See also
  OCIErrorGet(), OCILobCharSetForm(), OCILobLocatorIsInit()
  
  
  
  OCILobCopy()
  
  Name
  OCI Lob Copy
  
  Purpose
  Copies a portion of a LOB value into another LOB value.
  
  Syntax
  sword OCILobCopy ( OCISvcCtx        *svchp,
                     OCIError         *errhp,
                     OCILobLocator    *dst_locp,
                     OCILobLocator    *src_locp,
                     ub4              amount,
                     ub4              dst_offset,
                     ub4              src_offset );
  
  Comments
  Copies a portion of a LOB value into another LOB as specified. The data 
  is copied from the source to the destination. The source (src_locp) and the 
  destination (dlopb) LOBs must already exist.
  If the data already exists at the destination's start position, it is 
  overwritten with the source data. If the destination's start position is 
  beyond the end of the current data, a hole is created from the end of the data
  to the beginning of the newly written data from the source. The destination 
  LOB is extended to accommodate the newly written data if it extends 
  beyond the current length of the destination LOB. 
  It is an error to extend the destination LOB beyond the maximum length 
  allowed or to try to copy from a NULL LOB.
  Parameters
  svchp (IN) - the service context handle. 
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error. 
  dst_locp (IN/OUT) - a locator uniquely referencing the destination LOB. 
  src_locp (IN/OUT) - a locator uniquely referencing the source LOB. 
  amount (IN) - the number of character or bytes, as appropriate, to be copied.
  dst_offset (IN) - this is the absolute offset for the destination LOB. 
  For character LOBs it is the number of characters from the beginning of the 
  LOB at which to begin writing. For binary LOBs it is the number of bytes from 
  the beginning of the lob from which to begin reading. The offset starts at 1.
  src_offset (IN) - this is the absolute offset for the source LOB. 
  For character LOBs it is the number of characters from the beginning of the 
  LOB, for binary LOBs it is the number of bytes. Starts at 1.
  
  See Also 
  OCIErrorGet(), OCILobAppend(), OCILobWrite(), OCILobTrim()
  
  OCILobCreateTemporary()
  
  Name
  OCI Lob Create Temporary
  
  Purpose
  Create a Temporary Lob
  
  Syntax
  sword OCILobCreateTemporary(OCISvcCtx          *svchp,
                              OCIError           *errhp,
                              OCILobLocator      *locp,
                              ub2                 csid,
                              ub1                 csfrm,
                              ub1                 lobtype,
                              boolean             cache,
                              OCIDuration         duration);
  
  
  Comments
  svchp (IN) - the service context handle. 
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error. 
  locp (IN/OUT) - a locator which points to the temporary Lob
  csid (IN) - the character set id
  csfrm(IN) - the character set form
  lobtype (IN) - the lob type - one of the three constants OCI_TEMP_BLOB, 
                 OCI_TEMP_CLOB and OCI_TEMP_NCLOB
  cache(IN)-  TRUE if the temporary LOB goes through the cache; FALSE, if not.
  duration(IN)- duration of the temporary LOB; Can be a valid duration id or one 
                of the values: OCI_DURATION_SESSION, OCI_DURATION_CALL
                Note: OCI_DURATION_TRANSACTION is NOT supported in 8.1
  Related functions
  OCILobFreeTemporary()
  OCILobIsTemporary()
  
  OCILobDisableBuffering()
  
  Name
  OCI Lob Disable Buffering
  
  Purpose
  Disable lob buffering for the input locator.
  
  
  Syntax
  sword OCILobDisableBuffering ( OCISvcCtx      *svchp,
                                 OCIError       *errhp,
                                 OCILobLocator  *locp);
  
  Comments
  
  Disable lob buffering for the input locator.  The next time data is
  read/written from/to the lob through the input locator, the lob
  buffering subsystem is *not* used.  Note that this call does *not*
  implicitly flush the changes made in the buffering subsystem.  The 
  user must explicitly call OCILobFlushBuffer() to do this.
  
  Parameters
  svchp (IN) - the service context handle. 
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error. 
  locp (IN/OUT) - a locator uniquely referencing the LOB. 
  
  Related Functions
  OCILobEnableBuffering()
  OCIErrorGet()
  OCILobFlushBuffer()
  
  
  
  
  OCILobEnableBuffering()
  
  Name
  OCI Lob Enable Buffering
  
  Purpose
  Enable lob buffering for the input locator.
  
  
  Syntax
  sword OCILobEnableBuffering ( OCISvcCtx      *svchp,
                                OCIError       *errhp,
                                OCILobLocator  *locp);
  
  Comments
  
  Enable lob buffering for the input locator.  The next time data is
  read/written from/to the lob through the input locator, the lob
  buffering subsystem is used.  
  
  Once lob buffering is enabled for a locator, if that locator is passed to 
  one of the following routines, an error is returned:
          OCILobCopy, OCILobAppend, OCILobErase, OCILobGetLength, OCILobTrim
  
  Parameters
  svchp (IN) - the service context handle. 
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error. 
  locp (IN/OUT) - a locator uniquely referencing the LOB. 
  
  Related Functions
  OCILobDisableBuffering()
  OCIErrorGet()
  OCILobWrite()
  OCILobRead()
  OCILobFlushBuffer()
  
  
  
  
  OCILobErase()
  
  Name
  OCI Lob ERase
  
  Purpose
  Erases a specified portion of the LOB data starting at a specified offset.
  
  Syntax
  sword OCILobErase ( OCISvcCtx       *svchp,
                    OCIError        *errhp,
                    OCILobLocator   *locp,
                    ub4             *amount,
                    ub4             offset );
  
  Comments
  Erases a specified portion of the LOB data starting at a specified offset.
  The actual number of characters/bytes erased is returned. The actual number 
  of characters/bytes and the requested number of characters/bytes will differ 
  if the end of the LOB data is reached before erasing the requested number of 
  characters/bytes.
  If a section of data from the middle of the LOB data is erased, a hole is 
  created. When data from that hole is read, 0's are returned. If the LOB is
  NULL, this routine will indicate that 0 characters/bytes were erased.
  
  Parameters
  svchp (IN) - the service context handle.
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  locp (IN/OUT) - the LOB for which to erase a section of data.
  amount (IN/OUT) - On IN, the number of characters/bytes to erase. On OUT, 
  the actual number of characters/bytes erased.
  offset (IN) - absolute offset from the beginning of the LOB data from which 
  to start erasing data. Starts at 1.
  
  See Also
  OCIErrorGet(), OCILobRead(), OCILobWrite()
  
  OCILobOpen()
  
  Name
  OCI Lob Open
  
  Purpose
  Opens an internal or external Lob.
  
  Syntax
  sword OCILobOpen( OCISvcCtx        *svchp,
                    OCIError         *errhp,
                    OCILobLocator    *locp,
                    ub1               mode );
  
  Comments
  It is an error if the same lob is opened more than once in
  the same transaction. Lobs are opened implicitly if they are
  not opened before using them. A LOB has to be closed before
  the transaction commits else the transaction is rolled back.
  Open locators are closed if the transaction aborts. Multiple 
  users can open the same lob on different locators.
  Parameters
  svchp (IN) - the service context handle.
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  locp (IN/OUT) - locator points to the LOB to be opened
  mode (IN) - mode in which to open the lob. The valid modes are
  read-only - OCI_FILE_READONLY, read-write - OCI_FILE_READWRITE 
  
  OCILobClose()
  
  Name
  OCI Lob Close
  
  Purpose
  Closes an open internal or external Lob.
  
  Syntax
  sword OCILobClose( OCISvcCtx        *svchp,
                     OCIError         *errhp,
                     OCILobLocator    *locp );
  
  
  Comments
  It is an error if the lob is not open at this time. All LOBs
  that have been opened in a transaction have to be closed 
  before the transaction commits, else the transaction gets
  rolled back.
  
  Parameters
  svchp (IN) - the service context handle.
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  locp  (IN)  - A locator that was opened using OCILobOpen()
  
  
  OCILobFileClose()
  
  Name
  OCI Lob File CLoSe
  
  Purpose
  Closes a previously opened FILE.
  
  Syntax
  sword OCILobFileClose ( OCISvcCtx            *svchp,
                          OCIError             *errhp,
                          OCILobLocator        *filep );
  
  Comments
  Closes a previously opened FILE. It is an error if this function is called for
  an internal LOB. No error is returned if the FILE exists but is not opened.
  Parameters
  svchp (IN) - the service context handle.
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  filep (IN/OUT) - a pointer to a FILE locator to be closed.
  
  See Also
  OCIErrorGet(), OCILobFileOpen(), OCILobFileCloseAll(), OCILobFileIsOpen(),
  OCILobFileExists(), CREATE DIRECTORY DDL
  
  
  
  
  OCILobFileCloseAll()
  
  Name
  OCI LOB FILE Close All
  
  Purpose
  Closes all open FILEs on a given service context.
  
  Syntax
  sword OCILobFileCLoseAll ( OCISvcCtx *svchp, 
                             OCIError  *errhp );
  
  Comments
  Closes all open FILEs on a given service context.
  
  Parameters
  svchp (IN) - the service context handle.
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  
  See also
  OCILobFileClose(),
  OCIErrorGet(), OCILobFileOpen(), OCILobFileIsOpen(),
  OCILobFileExists(), CREATE DIRECTORY DDL
  
  
  
  
  OCILobFileExists()
  
  Name
  OCI LOB FILE exists
  
  Purpose
  Tests to see if the FILE exists on the server
  
  Syntax
  sword OCILobFileExists ( OCISvcCtx     *svchp,
                           OCIError      *errhp,
                           OCILobLocator *filep,
                           boolean       *flag );
  
  Comments
  Checks to see if a FILE exists for on the server.
  
  Parameters
  svchp (IN) - the OCI service context handle.
  errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, 
  it is recorded in err and this function returns OCI_ERROR. Diagnostic 
  information can be obtained by calling OCIErrorGet().
  filep (IN) - pointer to the FILE locator that refers to the file.
  flag (OUT) - returns TRUE if the FILE exists; FALSE if it does not.
  
  See also
  OCIErrorGet, CREATE DIRECTORY (DDL)
  
  
  
  
  OCILobFileGetName()
  
  Name
  OCI LOB FILE Get file Name
  
  Purpose
  Gets the FILE locator's directory alias and file name.
  
  Syntax
  sword OCILobFileGetName ( OCIEnv                   *envhp,
                            OCIError                 *errhp, 
                            CONST OCILobLocator      *filep, 
                            OraText                     *dir_alias,
                            ub2                      *d_length, 
                            OraText                     *filename, 
                            ub2                      *f_length );
  
  Comments
  Returns the directory alias and file name associated with this file locator.  
  
  Parameters
  envhp (IN/OUT) - OCI environment handle initialized in object mode.
  errhp (IN/OUT) -The OCI error handle. If there is an error, it is recorded in 
  errhp and this function returns OCI_ERROR. Diagnostic information can be 
  obtained by calling OCIErrorGet().
  filep (IN) - FILE locator for which to get the directory alias and file name.
  dir_alias (OUT) - buffer into which the directory alias name is placed. The 
  caller must allocate enough space for the directory alias name and must not 
  write into the space.
  d_length (IN/OUT)                 
          - IN: length of the input dir_alias string;
          - OUT: length of the returned dir_alias string.
  filename (OUT) - buffer into which the file name is placed. The caller must 
  allocate enough space for the file name and must not write into the space.
  f_length (IN/OUT) 
          - IN: length of the input filename string;
           - OUT: lenght of the returned filename string.
  
  See also
  OCILobFileSetName(), OCIErrorGet()
  
  
  
  
  OCILobFileIsOpen()
  
  Name
  OCI LOB FILE Is Open?
  
  Purpose
  Tests to see if the FILE is open
  
  Syntax
  sword OCILobFileIsOpen ( OCISvcCtx *svchp,
                           OCIError  *errhp,
                           OCILobLocator *filep,
                           boolean       *flag );
  
  Comments
  Checks to see if the FILE on the server is open for a given LobLocator.
  
  Parameters
  svchp (IN) - the OCI service context handle.
  errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it 
  is recorded in err and this function returns OCI_ERROR. Diagnostic 
  information can be obtained by calling OCIErrorGet().
  filep (IN) - pointer to the FILE locator being examined. If the input file 
  locator was never passed to OCILobFileOpen(), the file is considered not to 
  be opened by this locator. However, a different locator may have opened the 
  file. More than one file opens can be performed on the same file using 
  different locators.
  flag (OUT) - returns TRUE if the FILE is opened using this locator; FALSE if 
  it is not. 
  
  See also
  OCIErrorGet, OCILobFileOpen, OCILobFileClose, OCILobFileCloseAll, CREATE 
  DIRECTORY SQL command
  
  
  OCILobFileOpen()
  
  Name
  OCI LOB FILE open
  
  Purpose
  Opens a FILE for read-only access
  
  Syntax
  sword OCILobFileOpen ( OCISvcCtx            *svchp,
                       OCIError             *errhp,
                       OCILobLocator        *filep,
                       ub1                  mode );
  
  Comments
  Opens a FILE. The FILE can be opened for read-only access only. FILEs may not 
  be written to throough ORACLE.
  
  Parameters 
  svchp (IN) - the service context handle. 
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  filep (IN/OUT) - the FILE to open. Error if the locator does not refer to a 
  FILE. 
  mode (IN) - mode in which to open the file. The only valid mode is 
  read-only - OCI_FILE_READONLY. 
  
  See Also
  OCILobFileClose, OCIErrorGet, OCILobFileCloseAll, OCILobFileIsOpen, 
  OCILobFileSetName, CREATE DIRECTORY 
  
  
  
  
  OCILobFileSetName()
  
  Name
  OCI Lob File Set NaMe
  
  Purpose
  Sets directory alias and file name in the FILE locator.
  
  Syntax
  sword OCILobFileSetName ( OCIEnv             *envhp,
                            OCIError           *errhp,
                            OCILobLocator      **filepp,
                            OraText               *dir_alias,
                            ub2                d_length, 
                            OraText               *filename, 
                            ub2                f_length );
  Comments
  Sets the directory alias and file name in the LOB file locator.  
  Parameters
  envhp (IN/OUT) - OCI environment handle initialized in object mode.
  errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded 
  in errhp and this function returns OCI_ERROR. Diagnostic information can be 
  obtained by calling OCIErrorGet().
  filepp (IN/OUT) - FILE locator for which to set the directory alias name.
  The caller must have already allocated space for the locator by calling
  OCIDescriptorAlloc().
  dir_alias (IN) - buffer that contains the directory alias name to set in the 
  locator.
  d_length (IN) - length of the input dir_alias parameter.
  filename (IN) - buffer that contains the file name is placed.
  f_length (IN) - length of the input filename parameter.
  See also
  OCILobFileGetName, OCIErrorGet, CREATE DIRECTORY
  
  
  
  
  OCILobFlushBuffer()
  
  Name
  OCI Lob Flush all Buffers for this lob.
  
  Purpose
  Flush/write all buffers for this lob to the server.
  
  
  Syntax
  sword OCILobFlushBuffer ( OCISvcCtx       *svchp,
                            OCIError        *errhp,
                            OCILobLocator   *locp,
                            ub4              flag);
  
  Comments
  
  Flushes to the server, changes made to the buffering subsystem that 
  are associated with the lob referenced by the input locator.  This 
  routine will actually write the data in the buffer to the lob in 
  the database.  Lob buffering must have already been enabled for the 
  input lob locator.
  
  This routine, by default, does not free the buffer resources for
  reallocation to another buffered LOB operation. However, if you
  want to free the buffer explicitly, you can set the flag parameter
  to OCI_LOB_BUFFER_FREE.
  
  Parameters
  svchp (IN/OUT) - the service context handle. 
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error. 
  locp (IN/OUT) - a locator uniquely referencing the LOB. 
  flag    (IN)     - to indicate if the buffer resources need to be freed
                     after a flush. Default value is OCI_LOB_BUFFER_NOFREE.
                     Set it to OCI_LOB_BUFFER_FREE if you want the buffer
                     resources to be freed.
  Related Functions
  OCILobEnableBuffering()
  OCILobDisableBuffering()
  OCIErrorGet()
  OCILobWrite()
  OCILobRead()
  
  
  OCILobFreeTemporary()
  
  Name
  OCI Lob Free Temporary
  
  Purpose
  Free a temporary LOB
  
  Syntax
  sword OCILobFreeTemporary(OCISvcCtx          *svchp,
                            OCIError           *errhp,
                            OCILobLocator      *locp);
  
  Comments
    Frees the contents of the temporary Lob this locator is pointing to. Note
    that the locator itself is not freed until a OCIDescriptorFree is done.
  
  Parameters
  svchp (IN/OUT) - the service context handle. 
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error. 
  locp (IN/OUT) - a locator uniquely referencing the LOB
  
  Related functions
  OCILobCreateTemporary()
  OCILobIsTemporary()
  
  
  Name
  OCI Lob/File Get Chunk Size
  
  Purpose
  When creating the table, the user can specify the chunking factor, which can
  be a multiple of Oracle blocks. This corresponds to the chunk size used by the
  LOB data layer when accessing/modifying the LOB value. Part of the chunk is
  used to store system-related information and the rest stores the LOB value.
  This function returns the amount of space used in the LOB chunk to store 
  the LOB value.
  
  Syntax
  sword OCILobGetChunkSize ( OCISvcCtx      *svchp,
                             OCIError       *errhp,
                             OCILobLocator  *locp,
                             ub4            *chunksizep );
  
  Comments
   Performance will be improved if the user issues read/write
  requests using a multiple of this chunk size. For writes, there is an added 
  benefit since LOB chunks are versioned and, if all writes are done on chunk
  basis, no extra/excess versioning is done nor duplicated. Users could batch 
  up the write until they have enough for a chunk instead of issuing several
  write calls for the same chunk.
  
  Parameters
  svchp (IN) - the service context handle.
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  locp (IN/OUT) - a LOB locator that uniquely references the LOB. For internal
  LOBs, this locator must be a locator that was obtained from the server 
  specified by svchp. For FILEs, this locator can be initialized by a Select or
  OCILobFileSetName.
  chunksizep (OUT) - On output, it is the length of the LOB if not NULL - for 
  character LOBs it is the number of characters, for binary LOBs it is the 
  number of bytes in the LOB.
  
  Related Functions
  
  OCILobGetLength()
  
  Name
  OCI Lob/File Length
  
  Purpose
  Gets the length of a LOB/FILE. 
  
  Syntax
  sword OCILobGetLength ( OCISvcCtx      *svchp,
                          OCIError       *errhp,
                          OCILobLocator  *locp,
                          ub4            *lenp );
  
  Comments
  Gets the length of a LOB/FILE. If the LOB/FILE is NULL, the length is 
  undefined.
  
  Parameters
  svchp (IN) - the service context handle.
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  locp (IN/OUT) - a LOB locator that uniquely references the LOB. For internal
  LOBs, this locator must be a locator that was obtained from the server 
  specified by svchp. For FILEs, this locator can be initialized by a Select or
  OCILobFileSetName.
  lenp (OUT) - On output, it is the length of the LOB if not NULL - for 
  character LOBs it is the number of characters, for binary LOBs it is the 
  number of bytes in the LOB.
  
  Related Functions
  OCIErrorGet, OCIFileSetName
  
  
  
  OCILobIsEqual()
  
  Name
  
  OCI Lob Is Equal
  
  Purpose
  Compares two LOB locators for equality.
  
  Syntax
  sword OCILobIsEqual ( OCIEnv                  *envhp,
                        CONST OCILobLocator     *x,
                        CONST OCILobLocator     *y,
                        boolean                 *is_equal );
  
  Comments
  Compares the given LOB locators for equality.  Two LOB locators are equal if 
  and only if they both refer to the same LOB data.
  Two NULL locators are considered not equal by this function.
  Parameters
  envhp (IN) - the OCI environment handle.
  x (IN) - LOB locator to compare.
  y (IN) - LOB locator to compare.
  is_equal (OUT) - TRUE, if the LOB locators are equal; FALSE if they are not.
  
  See also
  OCILobAssign, OCILobLocatorIsInit
  OCILobLocatorAssign,
  OCILobIsOpen()
  
  Name
  
  OCI Lob Is Open
  sword OCILobIsOpen(svchp, errhp, locp, flag)
  OCISvcCtx     *svchp;
  OCIError      *errhp;
  OCILobLocator *locp;
  boolean       *flag;
  
  Comments
     Checks if the LOB locator was opened before. flag is set to TRUE
     if opened; FALSE otherwise 
  
  
  Parameters
  svchp (IN) - the service context handle. 
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error. 
  locp (IN) - the locator to test for temporary LOB
  flag(OUT) - TRUE, if the LOB locator points to is open
                      FALSE, if not.
  
  OCILobIsTemporary()
  
  Name
  
  OCI Lob Is Temporary
  
  Purpose
    Tests if this locator points to a temporary LOB
  
  Syntax
  sword OCILobIsTemporary(OCIEnv            *envhp,
                          OCIError          *errhp,
                          OCILobLocator     *locp,
                          boolean           *is_temporary);
  
  Comments
  Tests the locator to determine if it points to a temporary LOB.
  If so, is_temporary is set to TRUE. If not, is_temporary is set
  to FALSE.
  
  Parameters
  envhp (IN) - the environment handle. 
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error. 
  locp (IN) - the locator to test for temporary LOB
  is_temporary(OUT) - TRUE, if the LOB locator points to a temporary LOB;
                      FALSE, if not.
  
  See Also
  OCILobCreateTemporary, OCILobFreeTemporary
  
  
  OCILobLoadFromFile()
  
  Name
  OCI Lob Load From File
  
  Purpose
  Load/copy all or a portion of the file into an internal LOB.
  
  Syntax
  sword OCILobLoadFromFile ( OCISvcCtx        *svchp,
                             OCIError         *errhp,
                             OCILobLocator    *dst_locp,
                             OCILobLocator    *src_filep,
                             ub4              amount,
                             ub4              dst_offset,
                             ub4              src_offset );
  
  Comments
  Loads/copies a portion or all of a file value into an internal LOB as 
  specified.  The data is copied from the source file to the destination 
  internal LOB (BLOB/CLOB).  No character set conversions are performed 
  when copying the bfile data to a clob/nclob.  The bfile data must already
  be in the same character set as the clob/nclob in the database.  No
  error checking is performed to verify this.
  The source (src_filep) and the destination (dst_locp) LOBs must already exist.
  If the data already exists at the destination's start position, it is 
  overwritten with the source data. If the destination's start position is 
  beyond the end of the current data, a hole is created from the end of the data
  to the beginning of the newly written data from the source. The destination 
  LOB is extended to accommodate the newly written data if it extends 
  beyond the current length of the destination LOB. 
  It is an error to extend the destination LOB beyond the maximum length 
  allowed or to try to copy from a NULL LOB.
  Parameters
  svchp (IN) - the service context handle. 
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error. 
  dst_locp (IN/OUT) - a locator uniquely referencing the destination internal 
  LOB which may be of type blob, clob, or nclob. 
  src_filep (IN/OUT) - a locator uniquely referencing the source BFILE. 
  amount (IN) - the number of bytes to be copied.
  dst_offset (IN) - this is the absolute offset for the destination LOB. 
  For character LOBs it is the number of characters from the beginning of the 
  LOB at which to begin writing. For binary LOBs it is the number of bytes from 
  the beginning of the lob from which to begin reading. The offset starts at 1.
  src_offset (IN) - this is the absolute offset for the source BFILE.  It is 
  the number of bytes from the beginning of the LOB.  The offset starts at 1.
  
  See Also 
  OCIErrorGet(), OCILobAppend(), OCILobWrite(), OCILobTrim(), OCILobCopy()
  
  OCILobLocatorAssign()
  
  Name
  OCI Lob LOCATOR ASsiGn
  
  Purpose
  Assigns one LOB/FILE locator to another.
  
  Syntax
  sword OCILobLocatorAssign ( OCISvcCtx             *svchp, 
                              OCIError              *errhp, 
                              CONST OCILobLocator   *src_locp, 
                              OCILobLocator         **dst_locpp );
  
  Comments
  Assign source locator to destination locator.  After the assignment, both 
  locators refer to the same LOB data.  For internal LOBs, the source locator's 
  LOB data gets copied to the destination locator's LOB data only when the 
  destination locator gets stored in the table.  Therefore, issuing a flush of 
  the object containing the destination locator will copy the LOB data. For 
  FILEs only the locator that refers to the OS file is copied to the table. The
  OS file is not copied.
  Note : the only difference between this and OCILobAssign is that this takes
  a OCI service handle pointer instead of a OCI environment handle pointer
  
  Parameters
  svchp (IN/OUT) - OCI service handle initialized in object mode.
  errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded 
  in errhp and this function returns OCI_ERROR. Diagnostic information can be 
  obtained by calling OCIErrorGet().
  src_locp (IN) - LOB locator to copy from.
  dst_locpp (IN/OUT) - LOB locator to copy to.  The caller must allocate space 
  for the OCILobLocator by calling OCIDescriptorAlloc().
  
  See also
  OCIErrorGet()
  OCILobIsEqual()
  OCILobLocatorIsInit()
  OCILobAssign()
  
  
  
  
  OCILobLocatorIsInit()
  
  Name
  OCI LOB locator is initialized?
  
  Purpose
  Tests to see if a given LOB locator is initialized.
  
  Syntax
  sword OCILobLocatorIsInit ( OCIEnv   *envhp,
                              OCIError *errhp,
                              CONST OCILobLocator *locp,
                              boolean *is_initialized );
  
  Comments
  Tests to see if a given LOB locator is initialized.
  
  Parameters
  envhp (IN/OUT) - OCI environment handle initialized in object mode.
  errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it 
  is recorded in err and this function returns OCI_ERROR. Diagnostic 
  information can be obtained by calling OCIErrorGet().
  locp (IN) - the LOB locator being tested
  is_initialized (OUT) - returns TRUE if the given LOB locator is initialized; 
  FALSE if it is not.
  
  See also
  OCIErrorGet, OCILobIsEqual
  
  
  
  
  OCILobRead()
  
  Name
  OCI Lob/File ReaD
  
  Purpose
  Reads a portion of a LOB/FILE as specified by the call into a buffer. 
  
  Syntax
  sword OCILobRead ( OCISvcCtx       *svchp,
                     OCIError        *errhp,
                     OCILobLocator   *locp,
                     ub4             offset,
                     ub4             *amtp,
                     dvoid           *bufp,
                     ub4             bufl,
                     dvoid           *ctxp,  
                     OCICallbackLobRead cbfp,
                     ub2             csid,
                     ub1             csfrm );
  
  Comments
  Reads a portion of a LOB/FILE as specified by the call into a buffer. Data 
  read from a hole is returned as 0s. It is an error to try to read from a NULL
  LOB/FILE. The OS FILE must already exist on the server and must have been 
  opened using the input locator. Oracle must hav epermission to read the OS 
  file and user must have read permission on the directory object.
  
  Parameters
  svchp (IN/OUT) - the service context handle. 
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  locp (IN/OUT) - a LOB locator that uniquely references a LOB. 
  offset (IN) - On input, it is the absolute offset, for character LOBs in the 
  number of characters from the beginning of the LOB, for binary LOBs it is the 
  number of bytes. Starts from 1.
  amtp (IN/OUT) - On input, the number of character or bytes to be read. On 
  output, the actual number of bytes or characters read. 
  If the amount of bytes to be read is larger than the buffer length it is 
  assumed that the LOB is being read in a streamed mode. On input if this value 
  is 0, then the data shall be read in streamed mode from the LOB until the end 
  of LOB. If the data is read in pieces, *amtp always contains the length of 
  the last piece read.  If a callback function is defined, then this callback 
  function will be invoked each time bufl bytes are read off the pipe. Each 
  piece will be written into bufp.
  If the callback function is not defined, then OCI_NEED_DATA error code will 
  be returned. The application must invoke the LOB read over and over again to 
  read more pieces of the LOB until the OCI_NEED_DATA error code is not 
  returned. The buffer pointer and the length can be different in each call 
  if the pieces are being read into different sizes and location. 
  bufp (IN) - the pointer to a buffer into which the piece will be read. The 
  length of the allocated memory is assumed to be bufl. 
  bufl (IN) - the length of the buffer in octets. 
  ctxp (IN) - the context for the call back function. Can be NULL.
  cbfp (IN) - a callback that may be registered to be called for each piece. If 
  this is NULL, then OCI_NEED_DATA will be returned for each piece. 
  The callback function must return OCI_CONTINUE for the read to continue. 
  If any other error code is returned, the LOB read is aborted. 
    ctxp (IN) - the context for the call back function. Can be NULL.
    bufp (IN) - a buffer pointer for the piece.
    len (IN) - the length of length of current piece in bufp.
    piece (IN) - which piece - OCI_FIRST_PIECE, OCI_NEXT_PIECE or 
    OCI_LAST_PIECE.
  csid - the character set ID of the buffer data
  csfrm - the character set form of the buffer data
  
  Related Functions
  OCIErrorGet, OCILobWrite, OCILobFileOpen, OCILobFileSetName, CREATE DIRECTORY
  
  
  
  
  OCILobTrim()
  
  Name
  
  OCI Lob  Trim
  
  Purpose
  Trims the lob value to a shorter length
  
  Syntax
  sword OCILobTrim ( OCISvcCtx       *svchp,
                   OCIError        *errhp,
                   OCILobLocator   *locp,
                   ub4             newlen );
  
  Comments
  Truncates LOB data to a specified shorter length. 
  
  Parameters
  svchp (IN) - the service context handle. 
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error. 
  locp (IN/OUT) - a LOB locator that uniquely references the LOB. This locator 
  must be a locator that was obtained from the server specified by svchp. 
  newlen (IN) - the new length of the LOB data, which must be less than or equal
  to the current length. 
  
  Related Functions
  OCIErrorGet, OCILobWrite, OCiLobErase, OCILobAppend, OCILobCopy
  
  
  
  
  
  OCILobWrite()
  
  Name
  OCI Lob Write
  
  Purpose
  Writes a buffer into a LOB
  
  Syntax
  sword OCILobWrite ( OCISvcCtx       *svchp,
                      OCIError        *errhp,
                      OCILobLocator   *locp,
                      ub4             offset,
                      ub4             *amtp,
                      dvoid           *bufp, 
                      ub4             buflen,
                      ub1             piece,
                      dvoid           *ctxp,  
                      OCICallbackLobWrite   (cbfp)
                                      (
                                      dvoid    *ctxp,
                                      dvoid    *bufp,
                                      ub4      *lenp,
                                      ub1      *piecep ) 
                      ub2             csid
                      ub1             csfrm );
  
  
  Comments
  Writes a buffer into a LOB as specified. If LOB data already exists 
  it is overwritten with the data stored in the buffer.
  The buffer can be written to the LOB in a single piece with this call, or
  it can be provided piecewise using callbacks or a standard polling method.
  If this value of the piece parameter is OCI_FIRST_PIECE, data must be 
  provided through callbacks or polling.
  If a callback function is defined in the cbfp parameter, then this callback 
  function will be invoked to get the next piece after a piece is written to 
  the pipe. Each piece will be written from bufp.
  If no callback function is defined, then OCILobWrite() returns the 
  OCI_NEED_DATA error code. The application must all OCILobWrite() again 
  to write more pieces of the LOB. In this mode, the buffer pointer and the 
  length can be different in each call if the pieces are of different sizes and 
  from different locations. A piece value of OCI_LAST_PIECE terminates the 
  piecewise write. 
  
  Parameters
  svchp (IN/OUT) - the service context handle. 
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error. 
  locp (IN/OUT) - a LOB locator that uniquely references a LOB. 
  offset (IN) - On input, it is the absolute offset, for character LOBs in 
  the number of characters from the beginning of the LOB, for binary LOBs it 
  is the number of bytes. Starts at 1.
  bufp (IN) - the pointer to a buffer from which the piece will be written. The 
  length of the allocated memory is assumed to be the value passed in bufl. 
  Even if the data is being written in pieces, bufp must contain the first 
  piece of the LOB when this call is invoked.
  bufl (IN) - the length of the buffer in bytes.
  Note: This parameter assumes an 8-bit byte. If your platform uses a 
  longer byte, the value of bufl must be adjusted accordingly.
  piece (IN) - which piece of the buffer is being written. The default value for
  this parameter is OCI_ONE_PIECE, indicating the buffer will be written in a 
  single piece.
  The following other values are also possible for piecewise or callback mode: 
  OCI_FIRST_PIECE, OCI_NEXT_PIECE and OCI_LAST_PIECE.
  amtp (IN/OUT) - On input, takes the number of character or bytes to be 
  written. On output, returns the actual number of bytes or characters written. 
  If the data is written in pieces, *amtp will contain the total length of the 
  pieces written at the end of the call (last piece written) and is undefined in
  between. 
  (Note it is different from the piecewise read case)
  ctxp (IN) - the context for the call back function. Can be NULL.
  cbfp (IN) - a callback that may be registered to be called for each piece in 
  a piecewise write. If this is NULL, the standard polling method will be used.
  The callback function must return OCI_CONTINUE for the write to continue. 
  If any other error code is returned, the LOB write is aborted. The 
  callback takes the following parameters:
    ctxp (IN) - the context for the call back function. Can be NULL.
    bufp (IN/OUT) - a buffer pointer for the piece.
    lenp (IN/OUT) - the length of the buffer (in octets) and the length of 
    current piece in bufp (out octets).
    piecep (OUT) - which piece - OCI_NEXT_PIECE or OCI_LAST_PIECE.
  csid - the character set ID of the buffer data
  csfrm - the character set form of the buffer data
  Related Functions
  
  OCILobWriteAppend()
  
  Name
  OCI Lob Write Append
  
  Purpose
  Writes data to the end of a LOB value. This call provides the ability
  to get the length of the data and append it to the end of the LOB in
  a single round trip to the server.
  
  Syntax
  sword OCILobWriteAppend ( OCISvcCtx       *svchp,
                      OCIError        *errhp,
                      OCILobLocator   *locp,
                      ub4             *amtp,
                      dvoid           *bufp, 
                      ub4             buflen,
                      ub1             piece,
                      dvoid           *ctxp,  
                      OCICallbackLobWrite   (cbfp)
                                      (
                                      dvoid    *ctxp,
                                      dvoid    *bufp,
                                      ub4      *lenp,
                                      ub1      *piecep ) 
                      ub2             csid
                      ub1             csfrm );
  
  
  Comments
  Writes a buffer to the end of a LOB as specified. If LOB data already exists 
  it is overwritten with the data stored in the buffer.
  The buffer can be written to the LOB in a single piece with this call, or
  it can be provided piecewise using callbacks or a standard polling method.
  If this value of the piece parameter is OCI_FIRST_PIECE, data must be 
  provided through callbacks or polling.
  If a callback function is defined in the cbfp parameter, then this callback 
  function will be invoked to get the next piece after a piece is written to the 
  pipe. Each piece will be written from bufp.
  If no callback function is defined, then OCILobWriteAppend() returns the 
  OCI_NEED_DATA error code. The application must all OCILobWriteAppend() again 
  to write more pieces of the LOB. In this mode, the buffer pointer and the 
  length can be different in each call if the pieces are of different sizes and 
  from different locations. A piece value of OCI_LAST_PIECE terminates the 
  piecewise write. 
  
  Parameters
  svchp (IN/OUT) - the service context handle. 
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error. 
  locp (IN/OUT) - a LOB locator that uniquely references a LOB. 
  bufp (IN) - the pointer to a buffer from which the piece will be written. The 
  length of the allocated memory is assumed to be the value passed in bufl. Even 
  if the data is being written in pieces, bufp must contain the first piece of 
  the LOB when this call is invoked.
  bufl (IN) - the length of the buffer in bytes.
  Note: This parameter assumes an 8-bit byte. If your platform uses a 
  longer byte, the value of bufl must be adjusted accordingly.
  piece (IN) - which piece of the buffer is being written. The default value for
  this parameter is OCI_ONE_PIECE, indicating the buffer will be written in a 
  single piece.
  The following other values are also possible for piecewise or callback mode: 
  OCI_FIRST_PIECE, OCI_NEXT_PIECE and OCI_LAST_PIECE.
  amtp (IN/OUT) - On input, takes the number of character or bytes to be 
  written. On output, returns the actual number of bytes or characters written. 
  If the data is written in pieces, *amtp will contain the total length of the 
  pieces written at the end of the call (last piece written) and is undefined in
  between. 
  (Note it is different from the piecewise read case)
  ctxp (IN) - the context for the call back function. Can be NULL.
  cbfp (IN) - a callback that may be registered to be called for each piece in a 
  piecewise write. If this is NULL, the standard polling method will be used.
  The callback function must return OCI_CONTINUE for the write to continue. 
  If any other error code is returned, the LOB write is aborted. The 
  callback takes the following parameters:
    ctxp (IN) - the context for the call back function. Can be NULL.
    bufp (IN/OUT) - a buffer pointer for the piece.
    lenp (IN/OUT) - the length of the buffer (in octets) and the length of 
    current piece in bufp (out octets).
    piecep (OUT) - which piece - OCI_NEXT_PIECE or OCI_LAST_PIECE.
  csid - the character set ID of the buffer data
  csfrm - the character set form of the buffer data
  Related Functions
  
  
  
  
  OCILobGetStorageLimit()
  
  Name
  OCI Lob Get Storage Limit
  
  Purpose
  To get the maximum Length of a LOB in bytes that can be stored in the database.
  
  Syntax
  sword OCILobGetStorageLimit ( OCISvcCtx       *svchp,
                      OCIError        *errhp,
                      OCILobLocator   *locp,
                      oraub8          *limitp);
  
  
  Comments
  With unlimited size LOB support the limit for a LOB is no longer restricted to 4GB.
  This interface should be used to get the actual limit for storing data for a specific
  LOB locator. Note that if the compatibality is set to 9.2 or older the limit would still 
  be 4GB.
  
  Parameters
  svchp (IN/OUT) - the service context handle. 
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error. 
  locp (IN/OUT) - a LOB locator that uniquely references a LOB. 
  limitp (OUT)  - The storage limit for a LOB in bytes.
  Related Functions
  
  
  
  
  OCILogoff()
  Name
  OCI simplified Logoff
  Purpose
  This function is used to terminate a session created with OCILogon() or
  OCILogon2().
  Syntax
  sword OCILogoff ( OCISvcCtx      *svchp
                     OCIError       *errhp );
  Comments
  This call is used to terminate a session which was created with OCILogon() or
  OCILogon2().  
  This call implicitly deallocates the server, authentication, and service 
  context handles.
  Note: For more information on logging on and off in an application, 
  refer to the section "Application Initialization, Connection, and 
  Authorization" on page 2-16.
  Parameters
  svchp (IN) - the service context handle which was used in the call to 
  OCILogon() or OCILogon2().
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  See Also
  OCILogon(), OCILogon2().
  
  
  
  
  
  
  OCILogon()
  Name
  OCI Service Context Logon
  Purpose
  This function is used to create a simple logon session.
  Syntax
  sword OCILogon ( OCIEnv          *envhp,
                         OCIError        *errhp,
                         OCISvcCtx       *svchp,
                         CONST OraText      *username,
                         ub4             uname_len,
                         CONST OraText      *password,
                         ub4             passwd_len,
                         CONST OraText      *dbname,
                         ub4             dbname_len );
  Comments
  This function is used to create a simple logon session for an application. 
  Note: Users requiring more complex session (e.g., TP monitor 
  applications) should refer to the section "Application Initialization, 
  Connection, and Authorization" on page 2-16.
  This call allocates the error and service context handles which are passed to 
  it. This call also implicitly allocates server and authentication handles 
  associated with the session.  These handles can be retrieved by calling 
  OCIAttrGet() on the service context handle.
  Parameters
  envhp (IN) - the OCI environment handle.
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  svchp (OUT) - the service context pointer.
  username (IN) - the username.
  uname_len (IN) - the length of username.
  password (IN) - the user's password.
  passwd_len (IN) - the length of password.
  dbname (IN) - the name of the database to connect to.
  dbname_len (IN) - the length of dbname.
  See Also
  OCILogoff()
  
  
  
  
  
  OCILogon2()
  Name
  OCI Service Context Logon
  Purpose
  This function is used to create a logon session in connection pooling mode.
  Syntax
  sword OCILogon2 ( OCIEnv          *envhp,
                         OCIError        *errhp,
                         OCISvcCtx       **svchp,
                         CONST OraText      *username,
                         ub4             uname_len,
                         CONST OraText      *password,
                         ub4             passwd_len,
                         CONST OraText      *dbname,
                         ub4             dbname_len,
                         ub4             mode);
  Comments
  This function is used to create a simple logon session for an application in
  Connection Pooling mode. The valid values for mode are currently OCI_POOL and
  OCI_DEFAULT. Call to this function with OCI_DEFAULT mode is equivalent to 
  OCILogon() call.
  This call allocates the error and service context handles which are passed to 
  it. This call also implicitly allocates server and authentication handles 
  associated with the session.  These handles can be retrieved by calling 
  OCIAttrGet() on the service context handle. This call assumes that 
  OCIConnectionPoolCreate() has already been called for the same dbname.
  Parameters
  envhp (IN) - the OCI environment handle.
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  svchp (OUT) - the service context pointer.
  username (IN) - the username.
  uname_len (IN) - the length of username.
  password (IN) - the user's password. If this is null, it is assumed that a
                  proxy session has to be created and the required grants on 
                  the database are already done.
  passwd_len (IN) - the length of password.
  dbname (IN) - the name of the database to connect to.
  dbname_len (IN) - the length of dbname.
  mode (IN) - the mode for doing the server attach. Should be OCI_POOL for
              using Connection Pooling.
  
  
  See Also
  OCILogoff()
  
  
  
  
  
  OCIMemoryFree()
  Name
  OCI FREE Memory
  Purpose
  Frees up storage associated with the pointer.
  Syntax
  void OCIMemoryFree ( CONST OCIStmt   *stmhp,
                       dvoid           *memptr);
  Comments
  Frees up dynamically allocated data pointers associated with the pointer using 
  either the default memory free function or the registered memory free 
  function, as the case may be.
  A user-defined memory free function can be registered during the initial call 
  to OCIInitialize(). 
  This call is always successful. 
  Parameters
  stmhp (IN) - statement handle which returned this data buffer.
  memptr (IN) - pointer to data allocated by the client library. 
  Related Functions
  OCIInitialize()
  
  
  
  
  
  OCIParamGet()
  Name
  OCI Get PARaMeter
  Purpose
  Returns a descriptor of a parameter specified by position in the describe 
  handle or statement handle.
  Syntax
  sword OCIParamGet ( CONST dvoid       *hndlp,
                    ub4         htype,
                    OCIError    *errhp,
                    dvoid    **parmdpp,
                    ub4         pos );
  Comments
  This call returns a descriptor of a parameter specified by position in the 
  describe handle or statement handle. Parameter descriptors are always 
  allocated internally by the OCI library. They are read-only.
  OCI_NO_DATA may be returned if there are no parameter descriptors for this 
  position. 
  See Appendix B for more detailed information about parameter descriptor 
  attributes.
  Parameters
  hndlp (IN) - a statement handle or describe handle. The OCIParamGet() 
  function will return a parameter descriptor for this handle. 
  htype (IN) - the type of the handle passed in the handle parameter. Valid 
  types are OCI_HTYPE_DESCRIBE, for a describe handle OCI_HTYPE_STMT, for a 
  statement handle
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  parmdpp (OUT) - a descriptor of the parameter at the position given in the pos 
  parameter.
  pos (IN) - position number in the statement handle or describe handle. A 
  parameter descriptor will be returned for this position.
  Note: OCI_NO_DATA may be returned if there are no parameter 
  descriptors for this position. 
  Related Functions
  OCIAttrGet(), OCIAttrSet()
  
  
  
  
  
  OCIParamSet()
  Name
  OCI Parameter Set in handle
  Purpose
  Used to set a complex object retrieval descriptor into a complex object 
  retrieval handle.
  Syntax
  sword   OCIParamGet ( dvoid *hndlp,
                         ub4 htyp,
                        OCIError *errhp,
                        CONST dvoid *dscp,
                        ub4 dtyp,
                        ub4 pos );
  Comments
  This call sets a given complex object retrieval descriptor into a complex 
  object retrieval handle.
  The handle must have been previously allocated using OCIHandleAlloc(), and 
  the descriptor must have been previously allocated using OCIDescAlloc(). 
  Attributes of the descriptor are set using OCIAttrSet().
  Parameters
  hndlp (IN/OUT) - handle pointer.
  htype (IN) - handle type.
  errhp (IN/OUT) - error handle.
  dscp (IN) - complex object retrieval descriptor pointer.
  dtyp (IN) - 
  pos (IN) - position number.
  See Also
  
  
  
  
  
  OCIPasswordChange()
  Name
  OCI Change PassWord
  Purpose
  This call allows the password of an account to be changed.
  Syntax
  sword OCIPasswordChange ( OCISvcCtx     *svchp,
                          OCIError      *errhp,
                          CONST OraText    *user_name,
                          ub4           usernm_len,
                          CONST OraText    *opasswd,
                          ub4           opasswd_len,
                          CONST OraText    *npasswd,
                          sb4           npasswd_len,
                          ub4           mode);
  Comments
  This call allows the password of an account to be changed. This call is 
  similar to OCISessionBegin() with the following differences:
  If the user authentication is already established, it authenticates 
  the account using the old password and then changes the 
  password to the new password
  If the user authentication is not established, it establishes a user 
  authentication and authenticates the account using the old 
  password, then changes the password to the new password.
  This call is useful when the password of an account is expired and 
  OCISessionBegin() returns an error or warning which indicates that the 
  password has expired. 
  Parameters
  svchp (IN/OUT) - a handle to a service context. The service context handle 
  must be initialized and have a server context handle associated with it.
  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  user_name (IN) - specifies the user name. It points to a character string, 
  whose length is specified in usernm_len. This parameter must be NULL if the 
  service context has been initialized with an authentication handle.
  usernm_len (IN) - the length of the user name string specified in user_name. 
  For a valid user name string, usernm_len must be non-zero.
  opasswd (IN) - specifies the user's old password. It points to a character 
  string, whose length is specified in opasswd_len .
  opasswd_len (IN) - the length of the old password string specified in opasswd. 
  For a valid password string, opasswd_len must be non-zero.
  npasswd (IN) - specifies the user's new password. It points to a character 
  string, whose length is specified in npasswd_len which must be non-zero for a 
  valid password string. If the password complexity verification routine is 
  specified in the user's profile to verify the new password's complexity, the 
  new password must meet the complexity requirements of the verification 
  function.
  npasswd_len (IN)  - then length of the new password string specified in 
  npasswd. For a valid password string, npasswd_len must be non-zero.
  mode - pass as OCI_DEFAULT.
  Related Functions
  OCISessionBegin()
  
  
  ----------------------------------OCIReset------------------------------------
  
  
  OCIReset()
  Name
  OCI Reset
  Purpose
  Resets the interrupted asynchronous operation and protocol. Must be called
  if a OCIBreak call had been issued while a non-blocking operation was in
  progress.
  Syntax
  sword OCIReset ( dvoid      *hndlp,
                   OCIError   *errhp);
  Comments
  This call is called in non-blocking mode ONLY. Resets the interrupted
  asynchronous operation and protocol. Must be called if a OCIBreak call 
  had been issued while a non-blocking operation was in progress. 
  Parameters
  hndlp (IN) - the service context handle or the server context handle.
  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  Related Functions
  
  
  OCIResultSetToStmt()
  Name
  OCI convert Result Set to Statement Handle
  Purpose
  Converts a descriptor to statement handle for fetching rows.
  Syntax
  sword OCIResultSetToStmt ( OCIResult     *rsetdp,
                           OCIError      *errhp );
  Comments
  Converts a descriptor to statement handle for fetching rows.
  A result set descriptor can be allocated with a call to OCIDescAlloc().
  Parameters
  rsetdp (IN/OUT) - a result set descriptor pointer. 
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error. 
  Related Functions
  OCIDescAlloc()
  
  
  
  
  OCIServerAttach()
  Name
  OCI ATtaCH to server
  Purpose
  Creates an access path to a data source for OCI operations.
  Syntax
  sword OCIServerAttach ( OCIServer    *srvhp,
                        OCIError     *errhp,
                        CONST OraText   *dblink,
                        sb4          dblink_len,
                        ub4          mode);
  Comments
  This call is used to create an association between an OCI application and a 
  particular server. 
  This call initializes a server context handle, which must have been previously 
  allocated with a call to OCIHandleAlloc().
  The server context handle initialized by this call can be associated with a 
  service context through a call to OCIAttrSet(). Once that association has been 
  made, OCI operations can be performed against the server.
  If an application is operating against multiple servers, multiple server 
  context handles can be maintained. OCI operations are performed against 
  whichever server context is currently associated with the service context.
  Parameters
  srvhp (IN/OUT) - an uninitialized server context handle, which gets 
  initialized by this call. Passing in an initialized server handle causes an 
  error. 
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  dblink (IN) - specifies the database (server) to use. This parameter points to
  a character string which specifies a connect string or a service point. If the 
  connect string is NULL, then this call attaches to the default host. The length
  of connstr is specified in connstr_len. The connstr pointer may be freed by the
  caller on return.
  dblink_len (IN) - the length of the string pointed to by connstr. For a valid 
  connect string name or alias, connstr_len must be non-zero.
  mode (IN) - specifies the various modes of operation.  For release 8.0, pass as
  OCI_DEFAULT - in this mode, calls made to the server on this server context 
  are made in blocking mode. 
  Example
  See the description of OCIStmtPrepare() on page 13-96 for an example showing 
  the use of OCIServerAttach().
  Related Functions
  OCIServerDetach()
  
  
  
  OCIServerDetach()
  Name
  OCI DeTaCH server
  Purpose
  Deletes an access to a data source for OCI operations.
  Syntax
  sword OCIServerDetach ( OCIServer   *svrhp,
                        OCIError    *errhp,
                        ub4         mode); 
  Comments
  This call deletes an access to data source for OCI operations, which was 
  established by a call to OCIServerAttach(). 
  Parameters
  srvhp (IN) - a handle to an initialized server context, which gets reset to 
  uninitialized state. The handle is not de-allocated. 
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error. 
  mode (IN) - specifies the various modes of operation. The only valid mode is 
  OCI_DEFAULT for the default mode. 
  Related Functions
  OCIServerAttach()
  
  
  
  OCIServerVersion()
  Name
  OCI VERSion
  Purpose
  Returns the version string of the Oracle server.
  Syntax
  sword OCIServerVersion ( dvoid        *hndlp, 
                         OCIError     *errhp, 
                         OraText         *bufp,
                         ub4          bufsz
                         ub1          hndltype );
  Comments
  This call returns the version string of the Oracle server. 
  For example, the following might be returned as the version string if your 
  application is running against a 7.3.2 server:
  Oracle7 Server Release 7.3.2.0.0 - Production Release
  PL/SQL Release 2.3.2.0.0 - Production
  CORE Version 3.5.2.0.0 - Production
  TNS for SEQUENT DYNIX/ptx: Version 2.3.2.0.0 - Production
  NLSRTL Version 3.2.2.0.0 - Production
  
  Parameters
  hndlp (IN) - the service context handle or the server context handle.
  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  bufp (IN) - the buffer in which the version information is returned.
  bufsz (IN) - the length of the buffer.
  hndltype (IN) - the type of handle passed to the function.
  Related Functions
  
  
  
  
  
  OCISessionBegin()
  Name
  OCI Session Begin and authenticate user
  Purpose
  Creates a user authentication and begins a user session for a given server.
  Syntax
  sword OCISessionBegin ( OCISvcCtx     *svchp,
                        OCIError      *errhp,
                        OCISession    *usrhp,
                        ub4           credt,
                        ub4           mode);
  
  Comments
  For Oracle8, OCISessionBegin() must be called for any given server handle 
  before requests can be made against it. Also, OCISessionBegin() only supports 
  authenticating the user for access to the Oracle server specified by the 
  server handle in the service context. In other words, after OCIServerAttach() 
  is called to initialize a server handle, OCISessionBegin() must be called to 
  authenticate the user for that given server. 
  When OCISessionBegin() is called for the first time for the given server 
  handle, the initialized authentication handle is called a primary 
  authentication context. A primary authentication context may not be created 
  with the OCI_MIGRATE mode. Also, only one primary authentication context can 
  be created for a given server handle and the primary authentication context c
  an only ever be used with that server handle. If the primary authentication 
  context is set in a service handle with a different server handle, then an 
  error will result.
  After OCISessionBegin() has been called for the server handle, and the primary 
  authentication context is set in the service handle, OCISessionBegin() may be 
  called again to initialize another authentication handle with different (or 
  the same) credentials. When OCISessionBegin() is called with a service handle 
  set with a primary authentication context, the returned authentication context
  in authp is called a user authentication context. As many user authentication 
  contexts may be initialized as desired.
  User authentication contexts may be created with the OCI_MIGRATE mode. 
  If the OCI_MIGRATE mode is not specified, then the user authentication 
  context can only ever be used with the same server handle set in svchp. If 
  OCI_MIGRATE mode is specified, then the user authentication may be set 
  with different server handles. However, the user authentication context is 
  restricted to use with only server handles which resolve to the same database 
  instance and that have equivalent primary authentication contexts. Equivalent 
  authentication contexts are those which were authenticated as the same 
  database user.
  OCI_SYSDBA, OCI_SYSOPER, and OCI_PRELIM_AUTH may only be used 
  with a primary authentication context.
  To provide credentials for a call to OCISessionBegin(), one of two methods are 
  supported. The first is to provide a valid username and password pair for 
  database authentication in the user authentication handle passed to 
  OCISessionBegin(). This involves using OCIAttrSet() to set the 
  OCI_ATTR_USERNAME and OCI_ATTR_PASSWORD attributes on the 
  authentication handle. Then OCISessionBegin() is called with 
  OCI_CRED_RDBMS.
  Note: When the authentication handle is terminated using 
  OCISessionEnd(), the username and password attributes remain 
  unchanged and thus can be re-used in a future call to OCISessionBegin(). 
  Otherwise, they must be reset to new values before the next 
  OCISessionBegin() call.
  The second type of credentials supported are external credentials. No 
  attributes need to be set on the authentication handle before calling 
  OCISessionBegin(). The credential type is OCI_CRED_EXT. This is equivalent 
  to the Oracle7 `connect /' syntax. If values have been set for 
  OCI_ATTR_USERNAME and OCI_ATTR_PASSWORD, then these are 
  ignored if OCI_CRED_EXT is used.
  Parameters
  svchp (IN) - a handle to a service context. There must be a valid server 
  handle set in svchp.
  errhp (IN) - an error handle to the retrieve diagnostic information.
  usrhp (IN/OUT) - a handle to an authentication context, which is initialized 
  by this call.
  credt (IN) - specifies the type of credentials to use for authentication. 
  Valid values for credt are:
  OCI_CRED_RDBMS - authenticate using a database username and 
  password pair as credentials. The attributes OCI_ATTR_USERNAME 
  and OCI_ATTR_PASSWORD should be set on the authentication 
  context before this call.
  OCI_CRED_EXT - authenticate using external credentials. No username 
  or password is provided.
  mode (IN) - specifies the various modes of operation. Valid modes are:
  OCI_DEFAULT - in this mode, the authentication context returned may 
  only ever be set with the same server context specified in svchp. This 
  establishes the primary authentication context.
  OCI_MIGRATE - in this mode, the new authentication context may be 
  set in a service handle with a different server handle. This mode 
  establishes the user authentication context. 
  OCI_SYSDBA - in this mode, the user is authenticated for SYSDBA 
  access.
  OCI_SYSOPER - in this mode, the user is authenticated for SYSOPER 
  access.
  OCI_PRELIM_AUTH - this mode may only be used with OCI_SYSDBA 
  or OCI_SYSOPER to authenticate for certain administration tasks.
  Related Functions
  OCISessionEnd()
  
  
  
  
  
  
  OCISessionEnd()
  Name
  OCI Terminate user Authentication Context
  Purpose
  Terminates a user authentication context created by OCISessionBegin()
  Syntax
  sword OCISessionEnd ( OCISvcCtx       *svchp,
                      OCIError        *errhp,
                      OCISession      *usrhp,
                      ub4             mode);
  
  Comments
  The user security context associated with the service context is invalidated 
  by this call. Storage for the authentication context is not freed. The 
  transaction specified by the service context is implicitly committed. The 
  transaction handle, if explicitly allocated, may be freed if not being used.
  Resources allocated on the server for this user are freed.
  The authentication handle may be reused in a new call to OCISessionBegin().
  Parameters
  svchp (IN/OUT) - the service context handle. There must be a valid server 
  handle and user authentication handle associated with svchp.
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error. 
  usrhp (IN) - de-authenticate this user. If this parameter is passed as NULL, 
  the user in the service context handle is de-authenticated.
  mode (IN) - the only valid mode is OCI_DEFAULT.
  Example
  In this example, an authentication context is destroyed.
  Related Functions
  OCISessionBegin()
  
  
  
  
  OCIStmtExecute()
  Name
  OCI EXECute
  Purpose
  This call associates an application request with a server.
  Syntax
  sword OCIStmtExecute ( OCISvcCtx           *svchp,
                       OCIStmt             *stmtp,
                       OCIError            *errhp,
                       ub4                 iters,
                       ub4                 rowoff,
                       CONST OCISnapshot   *snap_in,
                       OCISnapshot         *snap_out,
                       ub4                 mode );
  Comments
  This function  is used to execute a prepared SQL statement.
  Using an execute call, the application associates a request with a server. On 
  success, OCI_SUCCESS is returned.
  If a SELECT statement is executed, the description of the select list follows 
  implicitly as a response. This description is buffered on the client side for 
  describes, fetches and define type conversions. Hence it is optimal to 
  describe a select list only after an execute. 
  Also for SELECT statements, some results are available implicitly. Rows will 
  be received and buffered at the end of the execute. For queries with small row 
  count, a prefetch causes memory to be released in the server if the end of 
  fetch is reached, an optimization that may result in memory usage reduction. 
  Set attribute call has been defined to set the number of rows to be prefetched
  per result set.
  For SELECT statements, at the end of the execute, the statement handle 
  implicitly maintains a reference to the service context on which it is 
  executed. It is the user's responsibility to maintain the integrity of the 
  service context. If the attributes of a service context is changed for 
  executing some operations on this service context, the service context must 
  be restored to have the same attributes, that a statement was executed with, 
  prior to a fetch on the statement handle. The implicit reference is maintained 
  until the statement handle is freed or the fetch is cancelled or an end of 
  fetch condition is reached.
  Note: If output variables are defined for a SELECT statement before a 
  call to OCIStmtExecute(), the number of rows specified by iters will be 
  fetched directly into the defined output buffers and additional rows 
  equivalent to the prefetch count will be prefetched. If there are no 
  additional rows, then the fetch is complete without calling 
  OCIStmtFetch().
  The execute call will return errors if the statement has bind data types that 
  are not supported in an Oracle7 server.
  Parameters
  svchp (IN/OUT) - service context handle. 
  stmtp (IN/OUT) - an statement handle - defines the statement and the 
  associated data to be executed at the server. It is invalid to pass in a 
  statement handle that has bind of data types only supported in release 8.0 
  when srvchp points to an Oracle7 server. 
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error. If the statement is being 
  batched and it is successful, then this handle will contain this particular 
  statement execution specific errors returned from the server when the batch is 
  flushed.
  iters (IN) - the number of times this statement is executed for non-Select 
  statements. For Select statements, if iters is non-zero, then defines must 
  have been done for the statement handle. The execution fetches iters rows into 
  these predefined buffers and prefetches more rows depending upon the prefetch 
  row count. This function returns an error if iters=0 for non-SELECT 
  statements.
  rowoff (IN) - the index from which the data in an array bind is relevant for 
  this multiple row execution. 
  snap_in (IN) - this parameter is optional. if supplied, must point to a 
  snapshot descriptor of type OCI_DTYPE_SNAP.  The contents of this descriptor 
  must be obtained from the snap_out parameter of a previous call.  The 
  descriptor is ignored if the SQL is not a SELECT.  This facility allows 
  multiple service contexts to ORACLE to see the same consistent snapshot of the 
  database's committed data.  However, uncommitted data in one context is not 
  visible to another context even using the same snapshot.
  snap_out (OUT) - this parameter optional. if supplied, must point to a 
  descriptor of type OCI_DTYPE_SNAP. This descriptor is filled in with an 
  opaque representation which is the current ORACLE "system change 
  number" suitable as a snap_in input to a subsequent call to OCIStmtExecute().  
  This descriptor should not be used any longer than necessary in order to avoid 
  "snapshot too old" errors. 
  mode (IN) - The modes are:
  If OCI_DEFAULT_MODE, the default mode, is selected, the request is 
  immediately executed. Error handle contains diagnostics on error if any. 
  OCI_EXACT_FETCH - if the statement is a SQL SELECT, this mode is 
  only valid if the application has set the prefetch row count prior to this 
  call. In this mode, the OCI library will get up to the number of rows 
  specified (i.e., prefetch row count plus iters). If the number of rows 
  returned by the query is greater than this value, OCI_ERROR will be 
  returned with ORA-01422 as the implementation specific error in a 
  diagnostic record. If the number of rows returned by the query is 
  smaller than the prefetch row count, OCI_SUCCESS_WITH_INFO will 
  be returned with ORA-01403 as the implementation specific error. The 
  prefetch buffer size is ignored and the OCI library tries to allocate all the 
  space required to contain the prefetched rows. The exact fetch semantics 
  apply to only the top level rows. No more rows can be fetched for this 
  query at the end of the call. 
  OCI_KEEP_FETCH_STATE - the result set rows (not yet fetched) of this 
  statement executed in this transaction will be maintained when the 
  transaction is detached for migration. By default, a query is cancelled 
  when a transaction is detached for migration. This mode is the default 
  mode when connected to a V7 server. 
  Related Functions
  OCIStmtPrepare()
  
  
  
  
  
  OCIStmtFetch()
  Name
  OCI FetCH
  Purpose
  Fetches rows from a query.
  Syntax
  sword OCIStmtFetch ( OCIStmt     *stmtp,
                     OCIError    *errhp, 
                     ub4         nrows,
                     ub2         orientation,
                     ub4         mode);
  Comments
  The fetch call is a local call, if prefetched rows suffice. However, this is 
  transparent to the application. If LOB columns are being read, LOB locators 
  are fetched for subsequent LOB operations to be performed on these locators. 
  Prefetching is turned off if LONG columns are involved. 
  A fetch with nrows set to 0 rows effectively cancels the fetch for this 
  statement.
  Parameters
  stmtp (IN) - a statement (application request) handle.
  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  nrows (IN) - number of rows to be fetched from the current position.
  orientation (IN) - for release 8.0, the only acceptable value is 
  OCI_FETCH_NEXT, which is also the default value. 
  mode (IN) - for release 8.0, beta-1, the following mode is defined.
  OCI_DEFAULT - default mode
  OCI_EOF_FETCH - indicates that it is the last fetch from the result set. 
  If nrows is non-zero, setting this mode effectively cancels fetching after 
  retrieving nrows, otherwise it cancels fetching immediately. 
  Related Functions
  OCIAttrGet()
  
  OCIStmtFetch2()
  Name
  OCI FetCH2
  Purpose
  Fetches rows from a query.
  Syntax
  sword OCIStmtFetch2 ( OCIStmt     *stmtp,
                     OCIError    *errhp, 
                     ub4         nrows,
                     ub2         orientation,
                     ub4         scrollOffset,
                     ub4         mode);
  Comments
  The fetch call works similar to the OCIStmtFetch call with the 
  addition of the fetchOffset parameter. It can be used on any 
  statement handle, whether it is scrollable or not. For a 
  non-scrollable statement handle, the only acceptable value 
  will be OCI_FETCH_NEXT, and the fetchOffset parameter will be 
  ignored. Applications are encouraged to use this new call. 
  
  A fetchOffset with OCI_FETCH_RELATIVE is equivalent to 
  OCI_FETCH_CURRENT with a value of 0, is equivalent to 
  OCI_FETCH_NEXT with a value of 1, and equivalent to 
  OCI_FETCH_PRIOR with a value of -1. Note that the range of 
  accessible rows is [1,OCI_ATTR_ROW_COUNT] beyond which an 
  error could be raised if sufficient rows do not exist in 
  
  The fetch call is a local call, if prefetched rows suffice. However, this is 
  transparent to the application. If LOB columns are being read, LOB locators 
  are fetched for subsequent LOB operations to be performed on these locators. 
  Prefetching is turned off if LONG columns are involved. 
  A fetch with nrows set to 0 rows effectively cancels the fetch for this 
  statement.
  Parameters
  stmtp (IN) - a statement (application request) handle.
  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  nrows (IN) - number of rows to be fetched from the current position.
  It defaults to 1 for orientation OCI_FETCH_LAST.
  orientation (IN) -  The acceptable values are as follows, with 
  OCI_FETCH_NEXT being the default value.
  OCI_FETCH_CURRENT gets the current row, 
  OCI_FETCH_NEXT gets the next row from the current position,
  OCI_FETCH_FIRST gets the first row in the result set,
  OCI_FETCH_LAST gets the last row in the result set, 
  OCI_FETCH_PRIOR gets the previous row from the current row in the result set, 
  OCI_FETCH_ABSOLUTE will fetch the row number (specified by fetchOffset 
  parameter) in the result set using absolute positioning,
  OCI_FETCH_RELATIVE will fetch the row number (specified by fetchOffset 
  parameter) in the result set using relative positioning.
  scrollOffset(IN) - offset used with the OCI_FETCH_ABSOLUTE and 
  OCI_FETCH_RELATIVE orientation parameters only. It specify
  the new current position for scrollable result set. It is 
  ignored for non-scrollable result sets. 
  mode (IN) - for release 8.0, beta-1, the following mode is defined.
  OCI_DEFAULT - default mode
  OCI_EOF_FETCH - indicates that it is the last fetch from the result set. 
  If nrows is non-zero, setting this mode effectively cancels fetching after 
  retrieving nrows, otherwise it cancels fetching immediately. 
  Related Functions
  OCIAttrGet()
  
  
  
  OCIStmtGetPieceInfo()
  Name
  OCI Get Piece Information
  Purpose
  Returns piece information for a piecewise operation.
  Syntax
  sword OCIStmtGetPieceInfo( CONST OCIStmt  *stmtp,
                           OCIError       *errhp,
                           dvoid          **hndlpp,
                           ub4            *typep,
                           ub1            *in_outp,
                           ub4            *iterp, 
                           ub4            *idxp,
                           ub1            *piecep );
  
  Comments
  When an execute/fetch call returns OCI_NEED_DATA to get/return a 
  dynamic bind/define value or piece, OCIStmtGetPieceInfo() returns the 
  relevant information: bind/define handle, iteration or index number and 
  which piece.
  See the section "Runtime Data Allocation and Piecewise Operations" on page 
  5-16 for more information about using OCIStmtGetPieceInfo().
  Parameters
  stmtp (IN) - the statement when executed returned OCI_NEED_DATA. 
  errhp (OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error. 
  hndlpp (OUT) - returns a pointer to the bind or define handle of the bind or 
  define whose runtime data is required or is being provided.
  typep (OUT) - the type of the handle pointed to by hndlpp: OCI_HTYPE_BIND 
  (for a bind handle) or OCI_HTYPE_DEFINE (for a define handle).
  in_outp (OUT) - returns OCI_PARAM_IN if the data is required for an IN bind 
  value. Returns OCI_PARAM_OUT if the data is available as an OUT bind 
  variable or a define position value.
  iterp (OUT) - returns the row number of a multiple row operation.
  idxp (OUT) - the index of an array element of a PL/SQL array bind operation.
  piecep (OUT) - returns one of the following defined values - 
  OCI_ONE_PIECE, OCI_FIRST_PIECE, OCI_NEXT_PIECE and 
  OCI_LAST_PIECE. The default value is always OCI_ONE_PIECE. 
  Related Functions
  OCIAttrGet(), OCIAttrGet(), OCIStmtExecute(), OCIStmtFetch(), 
  OCIStmtSetPieceInfo()
  
  
  
  
  OCIStmtPrepare()
  Name
  OCI Statement REQuest
  Purpose
  This call defines the SQL/PLSQL statement to be executed.
  Syntax
  sword OCIStmtPrepare ( OCIStmt      *stmtp,
                       OCIError     *errhp,
                       CONST OraText   *stmt, 
                       ub4          stmt_len,
                       ub4          language,
                       ub4          mode);
  Comments
  This call is used to prepare a SQL or PL/SQL statement for execution. The 
  OCIStmtPrepare() call defines an application request. 
  This is a purely local call. Data values for this statement initialized in 
  subsequent bind calls will be stored in a bind handle which will hang off this 
  statement handle.
  This call does not create an association between this statement handle and any 
  particular server.
  See the section "Preparing Statements" on page 2-21 for more information 
  about using this call.
  Parameters
  stmtp (IN) - a statement handle.
  errhp (IN) - an error handle to retrieve diagnostic information.
  stmt (IN) - SQL or PL/SQL statement to be executed. Must be a null-terminated 
  string. The pointer to the OraText of the statement must be available as long 
  as the statement is executed.
  stmt_len (IN) - length of the statement. Must not be zero.
  language (IN) - V7, V8, or native syntax. Possible values are:
  OCI_V7_SYNTAX - V7 ORACLE parsing syntax
  OCI_V8_SYNTAX - V8 ORACLE parsing syntax
  OCI_NTV_SYNTAX - syntax depending upon the version of the server. 
  mode (IN) - the only defined mode is OCI_DEFAULT for default mode. 
  Example
  This example demonstrates the use of OCIStmtPrepare(), as well as the OCI 
  application initialization calls.
  Related Functions
  OCIAttrGet(), OCIStmtExecute()
  
  
  OCIStmtPrepare2()
  Name
  OCI Statement REQuest with (a) early binding to svchp and/or
  (b) stmt caching
  Purpose
  This call defines the SQL/PLSQL statement to be executed.
  Syntax
  sword OCIStmtPrepare2 ( OCISvcCtx *svchp,
                       OCIStmt      **stmtp,
                       OCIError     *errhp,
                       CONST OraText   *stmt,
                       ub4          stmt_len,
                       CONST OraText *key,
                       ub4          key_len,
                       ub4          language,
                       ub4          mode);
  Comments
  This call is used to prepare a SQL or PL/SQL statement for execution. The
  OCIStmtPrepare() call defines an application request.
  This is a purely local call. Data values for this statement initialized in
  subsequent bind calls will be stored in a bind handle which will hang off this
  statement handle.
  This call creates an association between the statement handle and a service
  context. It differs from OCIStmtPrepare in that respect.It also supports
  stmt caching. The stmt will automatically be cached if the authp of the stmt
  has enabled stmt caching.
  Parameters
  svchp (IN) - the service context handle that contains the session that
               this stmt handle belongs to.
  stmtp (OUT) - an unallocated stmt handle must be pased in. An allocated
                and prepared  statement handle will be returned.
  errhp (IN) - an error handle to retrieve diagnostic information.
  stmt (IN) - SQL or PL/SQL statement to be executed. Must be a null-
              terminated string. The pointer to the OraText of the statement 
              must be available as long as the statement is executed.
  stmt_len (IN) - length of the statement. Must not be zero.
  key (IN) - This is only Valid for OCI Stmt Caching. It indicates the
             key to search with. It thus optimizes the search in the cache.
  key_len (IN) - the length of the key. This, too, is onlly valid for stmt
                 caching.
  language (IN) - V7, V8, or native syntax. Possible values are:
  OCI_V7_SYNTAX - V7 ORACLE parsing syntax
  OCI_V8_SYNTAX - V8 ORACLE parsing syntax
  OCI_NTV_SYNTAX - syntax depending upon the version of the server.
  mode (IN) - the defined modes are OCI_DEFAULT and OCI_PREP2_CACHE_SEARCHONLY.
  Example
  Related Functions
  OCIStmtExecute(), OCIStmtRelease()
  
  
  OCIStmtRelease()
  Name
  OCI Statement Release. This call is used to relesae the stmt that
  was retreived using OCIStmtPrepare2(). If the stmt is release
  using this call, OCIHandleFree() must not be called on the stmt
  handle.
  Purpose
  This call releases the statement obtained by OCIStmtPrepare2
  Syntax
  sword OCIStmtRelease ( OCIStmt      *stmtp,
                       OCIError     *errhp,
                       cONST OraText *key,
                       ub4          key_len,
                       ub4          mode);
  Comments
  This call is used to release a handle obtained via OCIStmtPrepare2().
  It also frees the memory associated with the handle.
  This is a purely local call.
  Parameters
  stmtp (IN/OUT) - The statement handle to be released/freed.
  errhp (IN) - an error handle to retrieve diagnostic information.
  key (IN) - This is only Valid for OCI Stmt Caching. It indicates the
             key to tag the stmt with.
  key_len (IN) - the length of the key. This, too, is only valid for stmt
                 caching.
  mode (IN) - the defined modes are OCI_DEFAULT for default mode and
              OCI_STRLS_CACHE_DELETE (only used for Stmt Caching).
  Example
  Related Functions
  OCIStmtExecute(), OCIStmtPrepare2()
  
  
  OCIStmtSetPieceInfo()
  Name
  OCI Set Piece Information
  Purpose
  Sets piece information for a piecewise operation.
  Syntax
  sword OCIStmtSetPieceInfo ( dvoid             *hndlp,
                            ub4               type,
                            OCIError          *errhp,
                            CONST dvoid       *bufp,
                            ub4               *alenp, 
                            ub1               piece,
                            CONST dvoid       *indp, 
                            ub2               *rcodep ); 
  Comments
  When an execute call returns OCI_NEED_DATA to get a dynamic IN/OUT 
  bind value or piece, OCIStmtSetPieceInfo() sets the piece information: the 
  buffer, the length, the indicator and which piece is currently being processed.
  For more information about using OCIStmtSetPieceInfo() see the section 
  "Runtime Data Allocation and Piecewise Operations" on page 5-16.
  Parameters
  hndlp (IN/OUT) - the bind/define handle.
  type (IN) - type of the handle. 
  errhp (OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  bufp (IN/OUT) - bufp is a pointer to a storage containing the data value or 
  the piece when it is an IN bind variable, otherwise bufp is a pointer to 
  storage for getting a piece or a value for OUT binds and define variables. For
  named data types or REFs, a pointer to the object or REF is returned.
  alenp (IN/OUT) - the length of the piece or the value. 
  piece (IN) - the piece parameter. The following are valid values: 
  OCI_ONE_PIECE, OCI_FIRST_PIECE, OCI_NEXT_PIECE, or 
  OCI_LAST_PIECE. 
  The default value is OCI_ONE_PIECE. This parameter is used for IN bind 
  variables only.
  indp (IN/OUT) - indicator. A pointer to a sb2 value or pointer to an indicator 
  structure for named data types (SQLT_NTY) and REFs (SQLT_REF), i.e., *indp 
  is either an sb2 or a dvoid * depending upon the data type.
  rcodep (IN/OUT) - return code. 
  Related Functions
  OCIAttrGet(), OCIAttrGet(), OCIStmtExecute(), OCIStmtFetch(), 
  OCIStmtGetPieceInfo()
  
  
  OCIFormatInit
  Name
  OCIFormat Package Initialize
  Purpose
  Initializes the OCIFormat package.
  Syntax
  sword OCIFormatInit(dvoid *hndl, OCIError *err);
  Comments
  This routine must be called before calling any other OCIFormat routine.
  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
  Parameters
  hndl (IN/OUT) - OCI environment or session handle
  err (IN/OUT) - OCI error handle
  Related Functions
  OCIFormatTerm()
  
  
  OCIFormatString
  Name
  OCIFormat Package Format String
  Purpose
  Writes a text string into the supplied text buffer using the argument
  list submitted to it and in accordance with the format string given.
  Syntax
  sword OCIFormatString(dvoid *hndl, OCIError *err, OraText *buffer,
                        sbig_ora bufferLength, sbig_ora *returnLength,
                        CONST OraText *formatString, ...);
  Comments
  The first call to this routine must be preceded by a call to the
  OCIFormatInit routine that initializes the OCIFormat package
  for use.  When this routine is no longer needed then terminate
  the OCIFormat package by a call to the OCIFormatTerm routine.
  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
  Parameters
  hndl         (IN/OUT) - OCI environment or session handle
  err          (IN/OUT) - OCI error handle
  buffer       (OUT)    - text buffer for the string
  bufferLength (IN)     - length of the text buffer
  returnLength (OUT)    - length of the formatted string
  formatString (IN)     - format specification string
  ...          (IN)     - variable argument list
  Related Functions
  
  
  OCIFormatTerm 
  Name
  OCIFormat Package Terminate
  Purpose
  Terminates the OCIFormat package.
  Syntax
  sword OCIFormatTerm(dvoid *hndl, OCIError *err);
  Comments
  It must be called after the OCIFormat package is no longer being used.
  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
  Parameters
  hndl (IN/OUT) - OCI environment or session handle
  err (IN/OUT) - OCI error handle
  Related Functions
  OCIFormatInit()
  
  
  OCIFormatTUb1
  Name
  OCIFormat Package ub1 Type
  Purpose
  Return the type value for the ub1 type.
  Syntax
  sword OCIFormatTUb1(void);
  Comments
  None
  Parameters
  None
  Related Functions
  None
  
  
  OCIFormatTUb2
  Name
  OCIFormat Package ub2 Type
  Purpose
  Return the type value for the ub2 type.
  Syntax
  sword OCIFormatTUb2(void);
  Comments
  None
  Parameters
  None
  Related Functions
  None
  
  
  OCIFormatTUb4
  Name
  OCIFormat Package ub4 Type
  Purpose
  Return the type value for the ub4 type.
  Syntax
  sword OCIFormatTUb4(void);
  Comments
  None
  Parameters
  None
  Related Functions
  None
  
  
  OCIFormatTUword
  Name
  OCIFormat Package uword Type
  Purpose
  Return the type value for the uword type.
  Syntax
  sword OCIFormatTUword(void);
  Comments
  None
  Parameters
  None
  Related Functions
  None
  
  
  OCIFormatTUbig_ora
  Name
  OCIFormat Package ubig_ora Type
  Purpose
  Return the type value for the ubig_ora type.
  Syntax
  sword OCIFormatTUbig_ora(void);
  Comments
  None
  Parameters
  None
  Related Functions
  None
  
  
  OCIFormatTSb1
  Name
  OCIFormat Package sb1 Type
  Purpose
  Return the type value for the sb1 type.
  Syntax
  sword OCIFormatTSb1(void);
  Comments
  None
  Parameters
  None
  Related Functions
  None
  
  
  OCIFormatTSb2
  Name
  OCIFormat Package sb2 Type
  Purpose
  Return the type value for the sb2 type.
  Syntax
  sword OCIFormatTSb2(void);
  Comments
  None
  Parameters
  None
  Related Functions
  None
  
  
  OCIFormatTSb4
  Name
  OCIFormat Package sb4 Type
  Purpose
  Return the type value for the sb4 type.
  Syntax
  sword OCIFormatTSb4(void);
  Comments
  None
  Parameters
  None
  Related Functions
  None
  
  
  OCIFormatTSword
  Name
  OCIFormat Package sword Type
  Purpose
  Return the type value for the sword type.
  Syntax
  sword OCIFormatTSword(void);
  Comments
  None
  Parameters
  None
  Related Functions
  None
  
  
  OCIFormatTSbig_ora
  Name
  OCIFormat Package sbig_ora Type
  Purpose
  Return the type value for the sbig_ora type.
  Syntax
  sword OCIFormatTSbig_ora(void);
  Comments
  None
  Parameters
  None
  Related Functions
  None
  
  
  OCIFormatTEb1
  Name
  OCIFormat Package eb1 Type
  Purpose
  Return the type value for the eb1 type.
  Syntax
  sword OCIFormatTEb1(void);
  Comments
  None
  Parameters
  None
  Related Functions
  None
  
  
  OCIFormatTEb2
  Name
  OCIFormat Package eb2 Type
  Purpose
  Return the type value for the eb2 type.
  Syntax
  sword OCIFormatTEb2(void);
  Comments
  None
  Parameters
  None
  Related Functions
  None
  
  
  OCIFormatTEb4
  Name
  OCIFormat Package eb4 Type
  Purpose
  Return the type value for the eb4 type.
  Syntax
  sword OCIFormatTEb4(void);
  Comments
  None
  Parameters
  None
  Related Functions
  None
  
  
  OCIFormatTEword
  Name
  OCIFormat Package eword Type
  Purpose
  Return the type value for the eword type.
  Syntax
  sword OCIFormatTEword(void);
  Comments
  None
  Parameters
  None
  Related Functions
  None
  
  
  OCIFormatTChar
  Name
  OCIFormat Package text Type
  Purpose
  Return the type value for the text type.
  Syntax
  sword OCIFormatTChar(void);
  Comments
  None
  Parameters
  None
  Related Functions
  None
  
  
  OCIFormatTText
  Name
  OCIFormat Package *text Type
  Purpose
  Return the type value for the *text type.
  Syntax
  sword OCIFormatTText(void);
  Comments
  None
  Parameters
  None
  Related Functions
  None
  
  
  OCIFormatTDouble
  Name
  OCIFormat Package double Type
  Purpose
  Return the type value for the double type.
  Syntax
  sword OCIFormatTDouble(void);
  Comments
  None
  Parameters
  None
  Related Functions
  None
  
  
  OCIFormatDvoid
  Name
  OCIFormat Package dvoid Type
  Purpose
  Return the type value for the dvoid type.
  Syntax
  sword OCIFormatTDvoid(void);
  Comments
  None
  Parameters
  None
  Related Functions
  None
  
  
  OCIFormatTEnd
  Name
  OCIFormat Package end Type
  Purpose
  Return the list terminator's "type".
  Syntax
  sword OCIFormatTEnd(void);
  Comments
  None
  Parameters
  None
  Related Functions
  None
  
  
  OCISvcCtxToLda()
  Name
  OCI toggle SerVice context handle to Version 7 Lda_Def
  Purpose
  Toggles between a V8 service context handle and a V7 Lda_Def.
  Syntax
  sword OCISvcCtxToLda ( OCISvcCtx    *srvhp,
                       OCIError     *errhp,
                       Lda_Def      *ldap );
  Comments
  Toggles between an Oracle8 service context handle and an Oracle7 Lda_Def.
  This function can only be called after a service context has been properly 
  initialized.
  Once the service context has been translated to an Lda_Def, it can be used in 
  release 7.x OCI calls (e.g., obindps(), ofen()).
  Note: If there are multiple service contexts which share the same server 
  handle, only one can be in V7 mode at any time.
  The action of this call can be reversed by passing the resulting Lda_Def to 
  the OCILdaToSvcCtx() function.
  Parameters
  svchp (IN/OUT) - the service context handle. 
  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error. 
  ldap (IN/OUT) - a Logon Data Area for V7-style OCI calls which is initialized 
  by this call. 
  Related Functions
  OCILdaToSvcCtx()
  
  
  
  
  OCITransCommit()
  Name
  OCI TX (transaction) CoMmit
  Purpose
  Commits the transaction associated with a specified service context.
  Syntax
  sword OCITransCommit ( OCISvcCtx    *srvcp,
                       OCIError     *errhp,
                       ub4          flags );
  Comments
  The transaction currently associated with the service context is committed. If 
  it is a distributed transaction that the server cannot commit, this call 
  additionally retrieves the state of the transaction from the database to be 
  returned to the user in the error handle.
  If the application has defined multiple transactions, this function operates 
  on the transaction currently associated with the service context. If the 
  application is working with only the implicit local transaction created when 
  database changes are made, that implicit transaction is committed.
  If the application is running in the object mode, then the modified or updated 
  objects in the object cache for this transaction are also committed.
  The flags parameter is used for one-phase commit optimization in distributed 
  transactions. If the transaction is non-distributed, the flags parameter is 
  ignored, and OCI_DEFAULT can be passed as its value. OCI applications 
  managing global transactions should pass a value of 
  OCI_TRANS_TWOPHASE to the flags parameter for a two-phase commit. The 
  default is one-phase commit.
  Under normal circumstances, OCITransCommit() returns with a status 
  indicating that the transaction has either been committed or rolled back. With 
  distributed transactions, it is possible that the transaction is now in-doubt 
  (i.e., neither committed nor aborted). In this case, OCITransCommit() 
  attempts to retrieve the status of the transaction from the server. 
  The status is returned.
  Parameters
  srvcp (IN) - the service context handle.
  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  flags -see the "Comments" section above.
  Related Functions
  OCITransRollback()
  
  
  
  
  OCITransDetach()
  Name
  OCI TX (transaction) DeTach
  Purpose
  Detaches a transaction.
  Syntax
  sword OCITransDetach ( OCISvcCtx    *srvcp,
                       OCIError     *errhp,
                       ub4          flags);
  Comments
  Detaches a global transaction from the service context handle. The transaction 
  currently attached to the service context handle becomes inactive at the end 
  of this call. The transaction may be resumed later by calling OCITransStart(), 
  specifying  a flags value of OCI_TRANS_RESUME.
  When a transaction is detached, the value which was specified in the timeout 
  parameter of OCITransStart() when the transaction was started is used to 
  determine the amount of time the branch can remain inactive before being 
  deleted by the server's PMON process.
  Note: The transaction can be resumed by a different process than the one 
  that detached it, provided that the transaction has the same 
  authorization.
  Parameters
  srvcp (IN) - the service context handle. 
  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  flags (IN) - you must pass a value of OCI_DEFAULT for this parameter.
  Related Functions
  OCITransStart()
  
  
  
  OCITransForget()
  Name
  OCI TX (transaction) ForGeT
  Purpose
  Causes the server to forget a heuristically completed global transaction.
  Syntax
  sword OCITransForget ( OCISvcCtx     *svchp, 
                       OCIError      *errhp,
                       ub4           flags);
  
  Comments
  
  Forgets a heuristically completed global transaction. The server deletes the 
  status of the transaction from the system's pending transaction table.
  The XID of the transaction to be forgotten is set as an attribute of the 
  transaction handle (OCI_ATTR_XID).
  Parameters
  srvcp (IN) - the service context handle - the transaction is rolled back.
  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  flags (IN) - you must pass OCI_DEFAULT for this parameter.
  Related Functions
  OCITransCommit(), OCITransRollback()
  
  
  OCITransMultiPrepare() 
  Name
  OCI Trans(action) Multi-Branch Prepare
  Purpose
  Prepares a transaction with multiple branches in a single call.
  Syntax
  sword OCITransMultiPrepare ( OCISvcCtx    *svchp,
                               ub4           numBranches,
                               OCITrans     **txns,
                               OCIError     **errhp);
  
  Comments
  
  Prepares the specified global transaction for commit.
  This call is valid only for distributed transactions.
  This call is an advanced performance feature intended for use only in
  situations where the caller is responsible for preparing all the branches
  in a transaction. 
  Parameters
  srvcp (IN) - the service context handle. 
  numBranches (IN) - This is the number of branches expected. It is also the
  array size for the next two parameters.
  txns (IN) - This is the array of transaction handles for the branches to
  prepare. They should all have the OCI_ATTR_XID set. The global transaction
  ID should be the same.
  errhp (IN) - This is the array of error handles. If OCI_SUCCESS is not
  returned, then these will indicate which branches received which errors.
  Related Functions
  OCITransPrepare()
  
  
  OCITransPrepare()
  Name
  OCI TX (transaction) PREpare
  Purpose
  Prepares a transaction for commit.
  Syntax
  sword OCITransPrepare ( OCISvcCtx    *svchp, 
                        OCIError     *errhp,
                        ub4          flags);
  
  Comments
  
  Prepares the specified global transaction for commit.
  This call is valid only for distributed transactions.
  The call returns OCI_SUCCESS_WITH_INFO if the transaction has not made 
  any changes. The error handle will indicate that the transaction is read-only. 
  The flag parameter is not currently used. 
  Parameters
  srvcp (IN) - the service context handle. 
  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  flags (IN) - you must pass OCI_DEFAULT for this parameter.
  Related Functions
  OCITransCommit(), OCITransForget()
  
  
  
  
  OCITransRollback()
  Name
  OCI TX (transaction) RoLlback
  Purpose
  Rolls back the current transaction.
  Syntax
  sword OCITransRollback ( dvoid        *svchp, 
                         OCIError     *errhp,
                         ub4          flags );
  Comments
  The current transaction- defined as the set of statements executed since the 
  last OCITransCommit() or since OCISessionBegin()-is rolled back.
  If the application is running under object mode then the modified or updated 
  objects in the object cache for this transaction are also rolled back.
  An error is returned if an attempt is made to roll back a global transaction 
  that is not currently active.
  Parameters
  svchp (IN) - a service context handle. The transaction currently set in the 
  service context handle is rolled back.
  errhp -(IN) - an error handle which can be passed to OCIErrorGet() for 
  diagnostic information in the event of an error.
  flags - you must pass a value of OCI_DEFAULT for this parameter.
  Related Functions
  OCITransCommit()
  
  
  
  
  OCITransStart()
  Name
  OCI TX (transaction) STart
  Purpose
  Sets the beginning of a transaction.
  Syntax
  sword OCITransStart ( OCISvcCtx    *svchp, 
                      OCIError     *errhp, 
                      uword        timeout,
                      ub4          flags);
  
  Comments
  This function sets the beginning of a global or serializable transaction. The 
  transaction context currently associated with the service context handle is 
  initialized at the end of the call if the flags parameter specifies that a new 
  transaction should be started.
  The XID of the transaction is set as an attribute of the transaction handle 
  (OCI_ATTR_XID)
  Parameters
  svchp (IN/OUT) - the service context handle. The transaction context in the 
  service context handle is initialized at the end of the call if the flag 
  specified a new transaction to be started.
  errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
  err and this function returns OCI_ERROR. Diagnostic information can be 
  obtained by calling OCIErrorGet().
  timeout (IN) - the time, in seconds, to wait for a transaction to become 
  available for resumption when OCI_TRANS_RESUME is specified. When 
  OCI_TRANS_NEW is specified, this value is stored and may be used later by 
  OCITransDetach().
  flags (IN) - specifies whether a new transaction is being started or an 
  existing transaction is being resumed. Also specifies serializiability or 
  read-only status. More than a single value can be specified. By default, 
  a read/write transaction is started. The flag values are:
  OCI_TRANS_NEW - starts a new transaction branch. By default starts a 
  tightly coupled and migratable branch.
  OCI_TRANS_TIGHT - explicitly specifies a tightly coupled branch
  OCI_TRANS_LOOSE - specifies a loosely coupled branch
  OCI_TRANS_RESUME - resumes an existing transaction branch. 
  OCI_TRANS_READONLY - start a readonly transaction
  OCI_TRANS_SERIALIZABLE - start a serializable transaction
  Related Functions
  OCITransDetach()
  
  
  
  
  
  ***************************************************************************** }
  {-----------------------Dynamic Callback Function Pointers------------------ }

  type

     OCICallbackInBind = function (ictxp:Pdvoid; bindp:POCIBind; iter:ub4; index:ub4; bufpp:PPdvoid;
                  alenp:Pub4; piecep:Pub1; indp:PPdvoid):sb4;cdecl;

     OCICallbackOutBind = function (octxp:Pdvoid; bindp:POCIBind; iter:ub4; index:ub4; bufpp:PPdvoid;
                  alenp:PPub4; piecep:Pub1; indp:PPdvoid; rcodep:PPub2):sb4;cdecl;

     OCICallbackDefine = function (octxp:Pdvoid; defnp:POCIDefine; iter:ub4; bufpp:PPdvoid; alenp:PPub4;
                  piecep:Pub1; indp:PPdvoid; rcodep:PPub2):sb4;cdecl;

//     OCIUserCallback = function (ctxp:Pdvoid; hndlp:Pdvoid; _type:ub4; fcode:ub4; when:ub4;
//                  returnCode:sword; errnop:Psb4; arglist:va_list):sword;cdecl;

     OCIEnvCallbackType = function (env:POCIEnv; mode:ub4; xtramem_sz:size_t; usrmemp:Pdvoid; ucbDesc:POCIUcb):sword;cdecl;
(* Const before type ignored *)

     OCICallbackLobRead = function (ctxp:Pdvoid; bufp:Pdvoid; len:ub4; piece:ub1):sb4;cdecl;

     OCICallbackLobWrite = function (ctxp:Pdvoid; bufp:Pdvoid; lenp:Pub4; piece:Pub1):sb4;cdecl;
{$ifdef ORAXB8_DEFINED}
(* Const before type ignored *)

  type

     OCICallbackLobRead2 = function (ctxp:Pdvoid; bufp:Pdvoid; len:oraub8; piece:ub1; changed_bufpp:PPdvoid;
                  changed_lenp:Poraub8):sb4;cdecl;

     OCICallbackLobWrite2 = function (ctxp:Pdvoid; bufp:Pdvoid; lenp:Poraub8; piece:Pub1; changed_bufpp:PPdvoid;
                  changed_lenp:Poraub8):sb4;cdecl;
(* Const before type ignored *)

     OCICallbackLobArrayRead = function (ctxp:Pdvoid; array_iter:ub4; bufp:Pdvoid; len:oraub8; piece:ub1; 
                  changed_bufpp:PPdvoid; changed_lenp:Poraub8):sb4;cdecl;

     OCICallbackLobArrayWrite = function (ctxp:Pdvoid; array_iter:ub4; bufp:Pdvoid; lenp:Poraub8; piece:Pub1; 
                  changed_bufpp:PPdvoid; changed_lenp:Poraub8):sb4;cdecl;
{$endif}

  type

     OCICallbackAQEnq = function (ctxp:Pdvoid; payload:PPdvoid; payload_ind:PPdvoid):sb4;cdecl;

     OCICallbackAQDeq = function (ctxp:Pdvoid; payload:PPdvoid; payload_ind:PPdvoid):sb4;cdecl;
  {--------------------------Failover Callback Structure --------------------- }

     OCICallbackFailover = function (svcctx:Pdvoid; envctx:Pdvoid; fo_ctx:Pdvoid; fo_type:ub4; fo_event:ub4):sb4;cdecl;

     POCIFocbkStruct = ^OCIFocbkStruct;
     OCIFocbkStruct = record
          callback_function : OCICallbackFailover;
          fo_ctx : Pdvoid;
       end;
  {--------------------------HA Callback Structure --------------------- }

     OCIEventCallback = procedure (evtctx:Pdvoid; eventhp:POCIEvent);cdecl;
  {****************************************************************************
                           ACTUAL PROTOTYPE DECLARATIONS
  ***************************************************************************** }
  type
    tmalocfp = function (ctxp:Pdvoid; size:size_t):Pdvoid;
    tralocfp = function (ctxp:Pdvoid; memptr:Pdvoid;newsize:size_t):Pdvoid;
    tmfreefp = procedure (ctxp:Pdvoid; memptr:Pdvoid);

{$IFNDEF LinkDynamically}

  function OCIInitialize(mode:ub4; ctxp:Pdvoid; malocfp:tmalocfp; ralocfp:tralocfp;mfreefp:tmfreefp ):sword;cdecl;external ocilib name 'OCIInitialize';

  function OCITerminate(mode:ub4):sword;cdecl;external ocilib name 'OCITerminate';

  function OCIEnvCreate(var envp:POCIEnv; mode:ub4; ctxp:Pdvoid; malocfp:tmalocfp; ralocfp:tralocfp;
             mfreefp:tmfreefp; xtramem_sz:size_t; usrmempp:PPdvoid):sword;cdecl;external ocilib name 'OCIEnvCreate';

  function OCIEnvNlsCreate(var envp:POCIEnv; mode:ub4; ctxp:Pdvoid; malocfp:tmalocfp; ralocfp:tralocfp;
             mfreefp:tmfreefp; xtramem_sz:size_t; usrmempp:PPdvoid; charset:ub2; ncharset:ub2):sword;cdecl;external ocilib name 'OCIEnvNlsCreate';

  function OCIFEnvCreate(var envp:POCIEnv; mode:ub4; ctxp:Pdvoid; malocfp:tmalocfp; ralocfp:tralocfp;
             mfreefp:tmfreefp; xtramem_sz:size_t; usrmempp:PPdvoid; fupg:Pdvoid):sword;cdecl;external ocilib name 'OCIFEnvCreate';

  function OCIHandleAlloc(parenth:Pdvoid; var hndlpp:Pdvoid; _type:ub4; xtramem_sz:size_t; usrmempp:PPdvoid):sword;cdecl;external ocilib name 'OCIHandleAlloc';

  function OCIHandleFree(hndlp:Pdvoid; _type:ub4):sword;cdecl;external ocilib name 'OCIHandleFree';

  function OCIDescriptorAlloc(parenth:Pdvoid; descpp:PPdvoid; _type:ub4; xtramem_sz:size_t; usrmempp:PPdvoid):sword;cdecl;external ocilib name 'OCIDescriptorAlloc';

  function OCIDescriptorFree(descp:Pdvoid; _type:ub4):sword;cdecl;external ocilib name 'OCIDescriptorFree';

  function OCIEnvInit(var envp:POCIEnv; mode:ub4; xtramem_sz:size_t; usrmempp:PPdvoid):sword;cdecl;external ocilib name 'OCIEnvInit';

  function OCIServerAttach(srvhp:POCIServer; errhp:POCIError; dblink:POraText; dblink_len:sb4; mode:ub4):sword;cdecl;external ocilib name 'OCIServerAttach';

  function OCIServerDetach(srvhp:POCIServer; errhp:POCIError; mode:ub4):sword;cdecl;external ocilib name 'OCIServerDetach';

  function OCISessionBegin(svchp:POCISvcCtx; errhp:POCIError; usrhp:POCISession; credt:ub4; mode:ub4):sword;cdecl;external ocilib name 'OCISessionBegin';

  function OCISessionEnd(svchp:POCISvcCtx; errhp:POCIError; usrhp:POCISession; mode:ub4):sword;cdecl;external ocilib name 'OCISessionEnd';

  function OCILogon(envhp:POCIEnv; errhp:POCIError;var svchp:POCISvcCtx; username:POraText; uname_len:ub4;
             password:POraText; passwd_len:ub4; dbname:POraText; dbname_len:ub4):sword;cdecl;external ocilib name 'OCILogon';

  function OCILogon2(envhp:POCIEnv; errhp:POCIError; var svchp:POCISvcCtx; username:POraText; uname_len:ub4;
             password:POraText; passwd_len:ub4; dbname:POraText; dbname_len:ub4; mode:ub4):sword;cdecl;external ocilib name 'OCILogon2';

  function OCILogoff(svchp:POCISvcCtx; errhp:POCIError):sword;cdecl;external ocilib name 'OCILogoff';

  function OCIPasswordChange(svchp:POCISvcCtx; errhp:POCIError; user_name:POraText; usernm_len:ub4; opasswd:POraText;
             opasswd_len:ub4; npasswd:POraText; npasswd_len:ub4; mode:ub4):sword;cdecl;external ocilib name 'OCIPasswordChange';

  function OCIStmtPrepare(stmtp:POCIStmt; errhp:POCIError; stmt:POraText; stmt_len:ub4; language:ub4;
             mode:ub4):sword;cdecl;external ocilib name 'OCIStmtPrepare';

  function OCIStmtPrepare2(svchp:POCISvcCtx; var stmtp:POCIStmt; errhp:POCIError; stmt:POraText; stmt_len:ub4;
             key:POraText; key_len:ub4; language:ub4; mode:ub4):sword;cdecl;external ocilib name 'OCIStmtPrepare2';

  function OCIStmtRelease(stmtp:POCIStmt; errhp:POCIError; key:POraText; key_len:ub4; mode:ub4):sword;cdecl;external ocilib name 'OCIStmtRelease';

  function OCIBindByPos(stmtp:POCIStmt; var bindp:POCIBind; errhp:POCIError; position:ub4; valuep:Pdvoid;
             value_sz:sb4; dty:ub2; indp:Pdvoid; alenp:Pub2; rcodep:Pub2; 
             maxarr_len:ub4; curelep:Pub4; mode:ub4):sword;cdecl;external ocilib name 'OCIBindByPos';

  function OCIBindByName(stmtp:POCIStmt; var bindp: POCIBind; errhp:POCIError; placeholder:POraText; placeh_len:sb4;
             valuep:Pdvoid; value_sz:sb4; dty:ub2; indp:Pdvoid; alenp:Pub2; 
             rcodep:Pub2; maxarr_len:ub4; curelep:Pub4; mode:ub4):sword;cdecl;external ocilib name 'OCIBindByName';

  function OCIBindObject(bindp:POCIBind; errhp:POCIError; _type:POCIType; pgvpp:PPdvoid; pvszsp:Pub4;
             indpp:PPdvoid; indszp:Pub4):sword;cdecl;external ocilib name 'OCIBindObject';

  function OCIBindDynamic(bindp:POCIBind; errhp:POCIError; ictxp:Pdvoid; icbfp:OCICallbackInBind; octxp:Pdvoid; 
             ocbfp:OCICallbackOutBind):sword;cdecl;external ocilib name 'OCIBindDynamic';

  function OCIBindArrayOfStruct(bindp:POCIBind; errhp:POCIError; pvskip:ub4; indskip:ub4; alskip:ub4; 
             rcskip:ub4):sword;cdecl;external ocilib name 'OCIBindArrayOfStruct';

  function OCIStmtGetPieceInfo(stmtp:POCIStmt; errhp:POCIError; hndlpp:PPdvoid; typep:Pub4; in_outp:Pub1; 
             iterp:Pub4; idxp:Pub4; piecep:Pub1):sword;cdecl;external ocilib name 'OCIStmtGetPieceInfo';

  function OCIStmtSetPieceInfo(hndlp:Pdvoid; _type:ub4; errhp:POCIError; bufp:Pdvoid; alenp:Pub4;
             piece:ub1; indp:Pdvoid; rcodep:Pub2):sword;cdecl;external ocilib name 'OCIStmtSetPieceInfo';

  function OCIStmtExecute(svchp:POCISvcCtx; stmtp:POCIStmt; errhp:POCIError; iters:ub4; rowoff:ub4;
             snap_in:POCISnapshot; snap_out:POCISnapshot; mode:ub4):sword;cdecl;external ocilib name 'OCIStmtExecute';

  function OCIDefineByPos(stmtp:POCIStmt; var defnp:POCIDefine; errhp:POCIError; position:ub4; valuep:Pdvoid;
             value_sz:sb4; dty:ub2; indp:Pdvoid; rlenp:Pub2; rcodep:Pub2; 
             mode:ub4):sword;cdecl;external ocilib name 'OCIDefineByPos';

  function OCIDefineObject(defnp:POCIDefine; errhp:POCIError; _type:POCIType; pgvpp:PPdvoid; pvszsp:Pub4;
             indpp:PPdvoid; indszp:Pub4):sword;cdecl;external ocilib name 'OCIDefineObject';

  function OCIDefineDynamic(defnp:POCIDefine; errhp:POCIError; octxp:Pdvoid; ocbfp:OCICallbackDefine):sword;cdecl;external ocilib name 'OCIDefineDynamic';

  function OCIRowidToChar(rowidDesc:POCIRowid; outbfp:POraText; outbflp:Pub2; errhp:POCIError):sword;cdecl;external ocilib name 'OCIRowidToChar';

  function OCIDefineArrayOfStruct(defnp:POCIDefine; errhp:POCIError; pvskip:ub4; indskip:ub4; rlskip:ub4; 
             rcskip:ub4):sword;cdecl;external ocilib name 'OCIDefineArrayOfStruct';

  function OCIStmtFetch(stmtp:POCIStmt; errhp:POCIError; nrows:ub4; orientation:ub2; mode:ub4):sword;cdecl;external ocilib name 'OCIStmtFetch';

  function OCIStmtFetch2(stmtp:POCIStmt; errhp:POCIError; nrows:ub4; orientation:ub2; scrollOffset:sb4; 
             mode:ub4):sword;cdecl;external ocilib name 'OCIStmtFetch2';

  function OCIStmtGetBindInfo(stmtp:POCIStmt; errhp:POCIError; size:ub4; startloc:ub4; found:Psb4; 
             bvnp:array of POraText; bvnl:array of ub1; invp:array of POraText; inpl:array of ub1; dupl:array of ub1; 
             var hndl:POCIBind):sword;cdecl;external ocilib name 'OCIStmtGetBindInfo';

  function OCIDescribeAny(svchp:POCISvcCtx; errhp:POCIError; objptr:Pdvoid; objnm_len:ub4; objptr_typ:ub1; 
             info_level:ub1; objtyp:ub1; dschp:POCIDescribe):sword;cdecl;external ocilib name 'OCIDescribeAny';

  function OCIParamGet(hndlp:Pdvoid; htype:ub4; errhp:POCIError; var parmdpp:Pdvoid; pos:ub4):sword;cdecl;external ocilib name 'OCIParamGet';

  function OCIParamSet(hdlp:Pdvoid; htyp:ub4; errhp:POCIError; dscp:Pdvoid; dtyp:ub4;
             pos:ub4):sword;cdecl;external ocilib name 'OCIParamSet';

  function OCITransStart(svchp:POCISvcCtx; errhp:POCIError; timeout:uword; flags:ub4):sword;cdecl;external ocilib name 'OCITransStart';

  function OCITransDetach(svchp:POCISvcCtx; errhp:POCIError; flags:ub4):sword;cdecl;external ocilib name 'OCITransDetach';

  function OCITransCommit(svchp:POCISvcCtx; errhp:POCIError; flags:ub4):sword;cdecl;external ocilib name 'OCITransCommit';

  function OCITransRollback(svchp:POCISvcCtx; errhp:POCIError; flags:ub4):sword;cdecl;external ocilib name 'OCITransRollback';

  function OCITransPrepare(svchp:POCISvcCtx; errhp:POCIError; flags:ub4):sword;cdecl;external ocilib name 'OCITransPrepare';

  function OCITransMultiPrepare(svchp:POCISvcCtx; numBranches:ub4; var txns:POCITrans; var errhp:POCIError):sword;cdecl;external ocilib name 'OCITransMultiPrepare';

  function OCITransForget(svchp:POCISvcCtx; errhp:POCIError; flags:ub4):sword;cdecl;external ocilib name 'OCITransForget';

  function OCIErrorGet(hndlp:Pdvoid; recordno:ub4; sqlstate:POraText; var errcodep:sb4; bufp:POraText;
             bufsiz:ub4; _type:ub4):sword;cdecl;external ocilib name 'OCIErrorGet';

  function OCILobAppend(svchp:POCISvcCtx; errhp:POCIError; dst_locp:POCILobLocator; src_locp:POCILobLocator):sword;cdecl;external ocilib name 'OCILobAppend';

  function OCILobAssign(envhp:POCIEnv; errhp:POCIError; src_locp:POCILobLocator; var dst_locpp:POCILobLocator):sword;cdecl;external ocilib name 'OCILobAssign';

  function OCILobCharSetForm(envhp:POCIEnv; errhp:POCIError; locp:POCILobLocator; csfrm:Pub1):sword;cdecl;external ocilib name 'OCILobCharSetForm';

  function OCILobCharSetId(envhp:POCIEnv; errhp:POCIError; locp:POCILobLocator; csid:Pub2):sword;cdecl;external ocilib name 'OCILobCharSetId';

  function OCILobCopy(svchp:POCISvcCtx; errhp:POCIError; dst_locp:POCILobLocator; src_locp:POCILobLocator; amount:ub4; 
             dst_offset:ub4; src_offset:ub4):sword;cdecl;external ocilib name 'OCILobCopy';

  function OCILobCreateTemporary(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; csid:ub2; csfrm:ub1; 
             lobtype:ub1; cache:boolean; duration:OCIDuration):sword;cdecl;external ocilib name 'OCILobCreateTemporary';

  function OCILobClose(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator):sword;cdecl;external ocilib name 'OCILobClose';

  function OCILobDisableBuffering(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator):sword;cdecl;external ocilib name 'OCILobDisableBuffering';

  function OCILobEnableBuffering(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator):sword;cdecl;external ocilib name 'OCILobEnableBuffering';

  function OCILobErase(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; amount:Pub4; offset:ub4):sword;cdecl;external ocilib name 'OCILobErase';

  function OCILobFileClose(svchp:POCISvcCtx; errhp:POCIError; filep:POCILobLocator):sword;cdecl;external ocilib name 'OCILobFileClose';

  function OCILobFileCloseAll(svchp:POCISvcCtx; errhp:POCIError):sword;cdecl;external ocilib name 'OCILobFileCloseAll';

  function OCILobFileExists(svchp:POCISvcCtx; errhp:POCIError; filep:POCILobLocator; flag:Pboolean):sword;cdecl;external ocilib name 'OCILobFileExists';

  function OCILobFileGetName(envhp:POCIEnv; errhp:POCIError; filep:POCILobLocator; dir_alias:POraText; d_length:Pub2;
             filename:POraText; f_length:Pub2):sword;cdecl;external ocilib name 'OCILobFileGetName';

  function OCILobFileIsOpen(svchp:POCISvcCtx; errhp:POCIError; filep:POCILobLocator; flag:Pboolean):sword;cdecl;external ocilib name 'OCILobFileIsOpen';

  function OCILobFileOpen(svchp:POCISvcCtx; errhp:POCIError; filep:POCILobLocator; mode:ub1):sword;cdecl;external ocilib name 'OCILobFileOpen';

  function OCILobFileSetName(envhp:POCIEnv; errhp:POCIError; var filepp:POCILobLocator; dir_alias:POraText; d_length:ub2;
             filename:POraText; f_length:ub2):sword;cdecl;external ocilib name 'OCILobFileSetName';

  function OCILobFlushBuffer(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; flag:ub4):sword;cdecl;external ocilib name 'OCILobFlushBuffer';

  function OCILobFreeTemporary(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator):sword;cdecl;external ocilib name 'OCILobFreeTemporary';

  function OCILobGetChunkSize(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; chunksizep:Pub4):sword;cdecl;external ocilib name 'OCILobGetChunkSize';

  function OCILobGetLength(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; lenp:Pub4):sword;cdecl;external ocilib name 'OCILobGetLength';

  function OCILobIsEqual(envhp:POCIEnv; x:POCILobLocator; y:POCILobLocator; is_equal:Pboolean):sword;cdecl;external ocilib name 'OCILobIsEqual';

  function OCILobIsOpen(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; flag:Pboolean):sword;cdecl;external ocilib name 'OCILobIsOpen';

  function OCILobIsTemporary(envp:POCIEnv; errhp:POCIError; locp:POCILobLocator; is_temporary:Pboolean):sword;cdecl;external ocilib name 'OCILobIsTemporary';

  function OCILobLoadFromFile(svchp:POCISvcCtx; errhp:POCIError; dst_locp:POCILobLocator; src_filep:POCILobLocator; amount:ub4; 
             dst_offset:ub4; src_offset:ub4):sword;cdecl;external ocilib name 'OCILobLoadFromFile';

  function OCILobLocatorAssign(svchp:POCISvcCtx; errhp:POCIError; src_locp:POCILobLocator; var dst_locpp:POCILobLocator):sword;cdecl;external ocilib name 'OCILobLocatorAssign';

  function OCILobLocatorIsInit(envhp:POCIEnv; errhp:POCIError; locp:POCILobLocator; is_initialized:Pboolean):sword;cdecl;external ocilib name 'OCILobLocatorIsInit';

  function OCILobOpen(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; mode:ub1):sword;cdecl;external ocilib name 'OCILobOpen';

  function OCILobRead(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; amtp:Pub4; offset:ub4; 
             bufp:Pdvoid; bufl:ub4; ctxp:Pdvoid; cbfp:OCICallbackLobRead; csid:ub2; 
             csfrm:ub1):sword;cdecl;external ocilib name 'OCILobRead';

  function OCILobTrim(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; newlen:ub4):sword;cdecl;external ocilib name 'OCILobTrim';

  function OCILobWrite(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; amtp:Pub4; offset:ub4; 
             bufp:Pdvoid; buflen:ub4; piece:ub1; ctxp:Pdvoid; cbfp:OCICallbackLobWrite; 
             csid:ub2; csfrm:ub1):sword;cdecl;external ocilib name 'OCILobWrite';

  function OCILobWriteAppend(svchp:POCISvcCtx; errhp:POCIError; lobp:POCILobLocator; amtp:Pub4; bufp:Pdvoid; 
             bufl:ub4; piece:ub1; ctxp:Pdvoid; cbfp:OCICallbackLobWrite; csid:ub2; 
             csfrm:ub1):sword;cdecl;external ocilib name 'OCILobWriteAppend';

  function OCIBreak(hndlp:Pdvoid; errhp:POCIError):sword;cdecl;external ocilib name 'OCIBreak';

  function OCIReset(hndlp:Pdvoid; errhp:POCIError):sword;cdecl;external ocilib name 'OCIReset';

  function OCIServerVersion(hndlp:Pdvoid; errhp:POCIError; bufp:POraText; bufsz:ub4; hndltype:ub1):sword;cdecl;external ocilib name 'OCIServerVersion';

  function OCIServerRelease(hndlp:Pdvoid; errhp:POCIError; bufp:POraText; bufsz:ub4; hndltype:ub1; 
             version:Pub4):sword;cdecl;external ocilib name 'OCIServerRelease';

  function OCIAttrGet(trgthndlp:Pdvoid; trghndltyp:ub4; attributep:Pdvoid; sizep:Pub4; attrtype:ub4;
             errhp:POCIError):sword;cdecl;external ocilib name 'OCIAttrGet';

  function OCIAttrSet(trgthndlp:Pdvoid; trghndltyp:ub4; attributep:Pdvoid; size:ub4; attrtype:ub4; 
             errhp:POCIError):sword;cdecl;external ocilib name 'OCIAttrSet';

  function OCISvcCtxToLda(svchp:POCISvcCtx; errhp:POCIError; ldap:PLda_Def):sword;cdecl;external ocilib name 'OCISvcCtxToLda';

  function OCILdaToSvcCtx(var svchpp:POCISvcCtx; errhp:POCIError; ldap:PLda_Def):sword;cdecl;external ocilib name 'OCILdaToSvcCtx';

  function OCIResultSetToStmt(rsetdp:POCIResult; errhp:POCIError):sword;cdecl;external ocilib name 'OCIResultSetToStmt';

  function OCIFileClose(hndl:Pdvoid; err:POCIError; filep:POCIFileObject):sword;cdecl;external ocilib name 'OCIFileClose';

//  function OCIUserCallbackRegister(hndlp:Pdvoid; _type:ub4; ehndlp:Pdvoid; callback:OCIUserCallback; ctxp:Pdvoid;
//             fcode:ub4; when:ub4; ucbDesc:POCIUcb):sword;cdecl;external ocilib name 'OCIUserCallbackRegister';

//  function OCIUserCallbackGet(hndlp:Pdvoid; _type:ub4; ehndlp:Pdvoid; fcode:ub4; when:ub4;
//             callbackp:POCIUserCallback; ctxpp:PPdvoid; ucbDesc:POCIUcb):sword;cdecl;external ocilib name 'OCIUserCallbackGet';

  function OCISharedLibInit(metaCtx:Pdvoid; libCtx:Pdvoid; argfmt:ub4; argc:sword; argv:PPdvoid; 
             envCallback:OCIEnvCallbackType):sword;cdecl;external ocilib name 'OCISharedLibInit';

  function OCIFileExists(hndl:Pdvoid; err:POCIError; filename:POraText; path:POraText; flag:Pub1):sword;cdecl;external ocilib name 'OCIFileExists';

  function OCIFileFlush(hndl:Pdvoid; err:POCIError; filep:POCIFileObject):sword;cdecl;external ocilib name 'OCIFileFlush';

  function OCIFileGetLength(hndl:Pdvoid; err:POCIError; filename:POraText; path:POraText; lenp:Pubig_ora):sword;cdecl;external ocilib name 'OCIFileGetLength';

  function OCIFileInit(hndl:Pdvoid; err:POCIError):sword;cdecl;external ocilib name 'OCIFileInit';

  function OCIFileOpen(hndl:Pdvoid; err:POCIError; var filep:POCIFileObject; filename:POraText; path:POraText;
             mode:ub4; create:ub4; _type:ub4):sword;cdecl;external ocilib name 'OCIFileOpen';

  function OCIFileRead(hndl:Pdvoid; err:POCIError; filep:POCIFileObject; bufp:Pdvoid; bufl:ub4; 
             bytesread:Pub4):sword;cdecl;external ocilib name 'OCIFileRead';

  function OCIFileSeek(hndl:Pdvoid; err:POCIError; filep:POCIFileObject; origin:uword; offset:ubig_ora; 
             dir:sb1):sword;cdecl;external ocilib name 'OCIFileSeek';

  function OCIFileTerm(hndl:Pdvoid; err:POCIError):sword;cdecl;external ocilib name 'OCIFileTerm';

  function OCIFileWrite(hndl:Pdvoid; err:POCIError; filep:POCIFileObject; bufp:Pdvoid; buflen:ub4; 
             byteswritten:Pub4):sword;cdecl;external ocilib name 'OCIFileWrite';

{$ifdef ORAXB8_DEFINED}

  function OCILobCopy2(svchp:POCISvcCtx; errhp:POCIError; dst_locp:POCILobLocator; src_locp:POCILobLocator; amount:oraub8; 
             dst_offset:oraub8; src_offset:oraub8):sword;cdecl;external ocilib name 'OCILobCopy2';

  function OCILobErase2(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; amount:Poraub8; offset:oraub8):sword;cdecl;external ocilib name 'OCILobErase2';

  function OCILobGetLength2(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; lenp:Poraub8):sword;cdecl;external ocilib name 'OCILobGetLength2';

  function OCILobLoadFromFile2(svchp:POCISvcCtx; errhp:POCIError; dst_locp:POCILobLocator; src_filep:POCILobLocator; amount:oraub8; 
             dst_offset:oraub8; src_offset:oraub8):sword;cdecl;external ocilib name 'OCILobLoadFromFile2';

  function OCILobRead2(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; byte_amtp:Poraub8; char_amtp:Poraub8; 
             offset:oraub8; bufp:Pdvoid; bufl:oraub8; piece:ub1; ctxp:Pdvoid; 
             cbfp:OCICallbackLobRead2; csid:ub2; csfrm:ub1):sword;cdecl;external ocilib name 'OCILobRead2';

  function OCILobArrayRead(svchp:POCISvcCtx; errhp:POCIError; array_iter:Pub4; lobp_arr:PPOCILobLocator; byte_amt_arr:Poraub8; 
             char_amt_arr:Poraub8; offset_arr:Poraub8; bufp_arr:PPdvoid; bufl_arr:Poraub8; piece:ub1; 
             ctxp:Pdvoid; cbfp:OCICallbackLobArrayRead; csid:ub2; csfrm:ub1):sword;cdecl;external ocilib name 'OCILobArrayRead';

  function OCILobTrim2(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; newlen:oraub8):sword;cdecl;external ocilib name 'OCILobTrim2';

  function OCILobWrite2(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; byte_amtp:Poraub8; char_amtp:Poraub8; 
             offset:oraub8; bufp:Pdvoid; buflen:oraub8; piece:ub1; ctxp:Pdvoid; 
             cbfp:OCICallbackLobWrite2; csid:ub2; csfrm:ub1):sword;cdecl;external ocilib name 'OCILobWrite2';

  function OCILobArrayWrite(svchp:POCISvcCtx; errhp:POCIError; array_iter:Pub4; lobp_arr:PPOCILobLocator; byte_amt_arr:Poraub8; 
             char_amt_arr:Poraub8; offset_arr:Poraub8; bufp_arr:PPdvoid; bufl_arr:Poraub8; piece:ub1; 
             ctxp:Pdvoid; cbfp:OCICallbackLobArrayWrite; csid:ub2; csfrm:ub1):sword;cdecl;external ocilib name 'OCILobArrayWrite';

  function OCILobWriteAppend2(svchp:POCISvcCtx; errhp:POCIError; lobp:POCILobLocator; byte_amtp:Poraub8; char_amtp:Poraub8; 
             bufp:Pdvoid; bufl:oraub8; piece:ub1; ctxp:Pdvoid; cbfp:OCICallbackLobWrite2; 
             csid:ub2; csfrm:ub1):sword;cdecl;external ocilib name 'OCILobWriteAppend2';

  function OCILobGetStorageLimit(svchp:POCISvcCtx; errhp:POCIError; lobp:POCILobLocator; limitp:Poraub8):sword;cdecl;external ocilib name 'OCILobGetStorageLimit';

{$endif}
  {
   ** Initialize the security package
    }

  function OCISecurityInitialize(sechandle:POCISecurity; error_handle:POCIError):sword;cdecl;external ocilib name 'OCISecurityInitialize';

  function OCISecurityTerminate(sechandle:POCISecurity; error_handle:POCIError):sword;cdecl;external ocilib name 'OCISecurityTerminate';

  function OCISecurityOpenWallet(osshandle:POCISecurity; error_handle:POCIError; wrllen:size_t; wallet_resource_locator:POraText; pwdlen:size_t; 
             password:POraText; wallet:PnzttWallet):sword;cdecl;external ocilib name 'OCISecurityOpenWallet';

  function OCISecurityCloseWallet(osshandle:POCISecurity; error_handle:POCIError; wallet:PnzttWallet):sword;cdecl;external ocilib name 'OCISecurityCloseWallet';

  function OCISecurityCreateWallet(osshandle:POCISecurity; error_handle:POCIError; wrllen:size_t; wallet_resource_locator:POraText; pwdlen:size_t; 
             password:POraText; wallet:PnzttWallet):sword;cdecl;external ocilib name 'OCISecurityCreateWallet';

  function OCISecurityDestroyWallet(osshandle:POCISecurity; error_handle:POCIError; wrllen:size_t; wallet_resource_locator:POraText; pwdlen:size_t; 
             password:POraText):sword;cdecl;external ocilib name 'OCISecurityDestroyWallet';

  function OCISecurityStorePersona(osshandle:POCISecurity; error_handle:POCIError; var persona:PnzttPersona; wallet:PnzttWallet):sword;cdecl;external ocilib name 'OCISecurityStorePersona';

  function OCISecurityOpenPersona(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona):sword;cdecl;external ocilib name 'OCISecurityOpenPersona';

  function OCISecurityClosePersona(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona):sword;cdecl;external ocilib name 'OCISecurityClosePersona';

  function OCISecurityRemovePersona(osshandle:POCISecurity; error_handle:POCIError; var persona:PnzttPersona):sword;cdecl;external ocilib name 'OCISecurityRemovePersona';

  function OCISecurityCreatePersona(osshandle:POCISecurity; error_handle:POCIError; identity_type:nzttIdentType; cipher_type:nzttCipherType; desc:PnzttPersonaDesc; 
             var persona:PnzttPersona):sword;cdecl;external ocilib name 'OCISecurityCreatePersona';

  function OCISecuritySetProtection(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; crypto_engine_function:nzttcef; data_unit_format:nztttdufmt; 
             protection_info:PnzttProtInfo):sword;cdecl;external ocilib name 'OCISecuritySetProtection';

  function OCISecurityGetProtection(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; crypto_engine_function:nzttcef; data_unit_format_ptr:Pnztttdufmt; 
             protection_info:PnzttProtInfo):sword;cdecl;external ocilib name 'OCISecurityGetProtection';

  function OCISecurityRemoveIdentity(osshandle:POCISecurity; error_handle:POCIError; var identity_ptr:PnzttIdentity):sword;cdecl;external ocilib name 'OCISecurityRemoveIdentity';

  function OCISecurityCreateIdentity(osshandle:POCISecurity; error_handle:POCIError; _type:nzttIdentType; desc:PnzttIdentityDesc; var identity_ptr:PnzttIdentity):sword;cdecl;external ocilib name 'OCISecurityCreateIdentity';

  function OCISecurityAbortIdentity(osshandle:POCISecurity; error_handle:POCIError; var identity_ptr:PnzttIdentity):sword;cdecl;external ocilib name 'OCISecurityAbortIdentity';

  function OCISecurityFreeIdentity(osshandle:POCISecurity; error_handle:POCIError; var identity_ptr:PnzttIdentity):sword;cdecl;external ocilib name 'OCISecurityFreeIdentity';

  function OCISecurityStoreTrustedIdentity(osshandle:POCISecurity; error_handle:POCIError; var identity_ptr:PnzttIdentity; persona:PnzttPersona):sword;cdecl;external ocilib name 'OCISecurityStoreTrustedIdentity';

  function OCISecuritySign(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; signature_state:nzttces; input_length:size_t; 
             input:Pub1; buffer_block:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecuritySign';

  function OCISecuritySignExpansion(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; inputlen:size_t; signature_length:Psize_t):sword;cdecl;external ocilib name 'OCISecuritySignExpansion';

  function OCISecurityVerify(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; signature_state:nzttces; siglen:size_t; 
             signature:Pub1; extracted_message:PnzttBufferBlock; verified:Pboolean; validated:Pboolean; var signing_party_identity:PnzttIdentity):sword;cdecl;external ocilib name 'OCISecurityVerify';

  function OCISecurityValidate(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; identity:PnzttIdentity; validated:Pboolean):sword;cdecl;external ocilib name 'OCISecurityValidate';

  function OCISecuritySignDetached(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; signature_state:nzttces; input_length:size_t; 
             input:Pub1; signature:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecuritySignDetached';

  function OCISecuritySignDetExpansion(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; input_length:size_t; required_buffer_length:Psize_t):sword;cdecl;external ocilib name 'OCISecuritySignDetExpansion';

  function OCISecurityVerifyDetached(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; signature_state:nzttces; data_length:size_t; 
             data:Pub1; siglen:size_t; signature:Pub1; verified:Pboolean; validated:Pboolean; 
             var signing_party_identity:PnzttIdentity):sword;cdecl;external ocilib name 'OCISecurityVerifyDetached';

  function OCISecurity_PKEncrypt(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; number_of_recipients:size_t; recipient_list:PnzttIdentity; 
             encryption_state:nzttces; input_length:size_t; input:Pub1; encrypted_data:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecurity_PKEncrypt';

  function OCISecurityPKEncryptExpansion(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; number_recipients:size_t; input_length:size_t; 
             buffer_length_required:Psize_t):sword;cdecl;external ocilib name 'OCISecurityPKEncryptExpansion';

  function OCISecurityPKDecrypt(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; encryption_state:nzttces; input_length:size_t; 
             input:Pub1; encrypted_data:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecurityPKDecrypt';

  function OCISecurityEncrypt(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; encryption_state:nzttces; input_length:size_t; 
             input:Pub1; encrypted_data:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecurityEncrypt';

  function OCISecurityEncryptExpansion(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; input_length:size_t; encrypted_data_length:Psize_t):sword;cdecl;external ocilib name 'OCISecurityEncryptExpansion';

  function OCISecurityDecrypt(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; decryption_state:nzttces; input_length:size_t; 
             input:Pub1; decrypted_data:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecurityDecrypt';

  function OCISecurityEnvelope(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; number_of_recipients:size_t; identity:PnzttIdentity; 
             encryption_state:nzttces; input_length:size_t; input:Pub1; enveloped_data:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecurityEnvelope';

  function OCISecurityDeEnvelope(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; decryption_state:nzttces; input_length:size_t; 
             input:Pub1; output_message:PnzttBufferBlock; verified:Pboolean; validated:Pboolean; var sender_identity:PnzttIdentity):sword;cdecl;external ocilib name 'OCISecurityDeEnvelope';

  function OCISecurityKeyedHash(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; hash_state:nzttces; input_length:size_t; 
             input:Pub1; keyed_hash:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecurityKeyedHash';

  function OCISecurityKeyedHashExpansion(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; input_length:size_t; required_buffer_length:Psize_t):sword;cdecl;external ocilib name 'OCISecurityKeyedHashExpansion';

  function OCISecurityHash(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; hash_state:nzttces; input:size_t; 
             input_length:Pub1; hash:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecurityHash';

  function OCISecurityHashExpansion(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; input_length:size_t; required_buffer_length:Psize_t):sword;cdecl;external ocilib name 'OCISecurityHashExpansion';

  function OCISecuritySeedRandom(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; seed_length:size_t; seed:Pub1):sword;cdecl;external ocilib name 'OCISecuritySeedRandom';

  function OCISecurityRandomBytes(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; number_of_bytes_desired:size_t; random_bytes:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecurityRandomBytes';

  function OCISecurityRandomNumber(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; random_number_ptr:Puword):sword;cdecl;external ocilib name 'OCISecurityRandomNumber';

  function OCISecurityInitBlock(osshandle:POCISecurity; error_handle:POCIError; buffer_block:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecurityInitBlock';

  function OCISecurityReuseBlock(osshandle:POCISecurity; error_handle:POCIError; buffer_block:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecurityReuseBlock';

  function OCISecurityPurgeBlock(osshandle:POCISecurity; error_handle:POCIError; buffer_block:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecurityPurgeBlock';

  function OCISecuritySetBlock(osshandle:POCISecurity; error_handle:POCIError; flags_to_set:uword; buffer_length:size_t; used_buffer_length:size_t; 
             buffer:Pub1; buffer_block:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecuritySetBlock';

  function OCISecurityGetIdentity(osshandle:POCISecurity; error_handle:POCIError; namelen:size_t; distinguished_name:POraText; var identity:PnzttIdentity):sword;cdecl;external ocilib name 'OCISecurityGetIdentity';

  function OCIAQEnq(svchp:POCISvcCtx; errhp:POCIError; queue_name:POraText; enqopt:POCIAQEnqOptions; msgprop:POCIAQMsgProperties; 
             payload_tdo:POCIType; payload:PPdvoid; payload_ind:PPdvoid; var msgid:POCIRaw; flags:ub4):sword;cdecl;external ocilib name 'OCIAQEnq';

  function OCIAQDeq(svchp:POCISvcCtx; errhp:POCIError; queue_name:POraText; deqopt:POCIAQDeqOptions; msgprop:POCIAQMsgProperties; 
             payload_tdo:POCIType; payload:PPdvoid; payload_ind:PPdvoid; var msgid: POCIRaw; flags:ub4):sword;cdecl;external ocilib name 'OCIAQDeq';

  function OCIAQEnqArray(svchp:POCISvcCtx; errhp:POCIError; queue_name:POraText; enqopt:POCIAQEnqOptions; iters:Pub4; 
             var msgprop:POCIAQMsgProperties; payload_tdo:POCIType; payload:PPdvoid; payload_ind:PPdvoid; var msgid:POCIRaw;
             ctxp:Pdvoid; enqcbfp:OCICallbackAQEnq; flags:ub4):sword;cdecl;external ocilib name 'OCIAQEnqArray';

  function OCIAQDeqArray(svchp:POCISvcCtx; errhp:POCIError; queue_name:POraText; deqopt:POCIAQDeqOptions; iters:Pub4; 
             var msgprop:POCIAQMsgProperties; payload_tdo:POCIType; payload:PPdvoid; payload_ind:PPdvoid; var msgid:POCIRaw;
             ctxp:Pdvoid; deqcbfp:OCICallbackAQDeq; flags:ub4):sword;cdecl;external ocilib name 'OCIAQDeqArray';

  function OCIAQListen(svchp:POCISvcCtx; errhp:POCIError; var agent_list:POCIAQAgent; num_agents:ub4; wait:sb4;
             var agent:POCIAQAgent; flags:ub4):sword;cdecl;external ocilib name 'OCIAQListen';

  function OCIAQListen2(svchp:POCISvcCtx; errhp:POCIError; var agent_list:POCIAQAgent; num_agents:ub4; lopts:POCIAQListenOpts;
             var agent:POCIAQAgent; lmops:POCIAQLisMsgProps; flags:ub4):sword;cdecl;external ocilib name 'OCIAQListen2';

  function OCIExtractInit(hndl:Pdvoid; err:POCIError):sword;cdecl;external ocilib name 'OCIExtractInit';

  function OCIExtractTerm(hndl:Pdvoid; err:POCIError):sword;cdecl;external ocilib name 'OCIExtractTerm';

  function OCIExtractReset(hndl:Pdvoid; err:POCIError):sword;cdecl;external ocilib name 'OCIExtractReset';

  function OCIExtractSetNumKeys(hndl:Pdvoid; err:POCIError; numkeys:uword):sword;cdecl;external ocilib name 'OCIExtractSetNumKeys';

  function OCIExtractSetKey(hndl:Pdvoid; err:POCIError; name:POraText; _type:ub1; flag:ub4;
             defval:Pdvoid; intrange:Psb4; var strlist:POraText):sword;cdecl;external ocilib name 'OCIExtractSetKey';

  function OCIExtractFromFile(hndl:Pdvoid; err:POCIError; flag:ub4; filename:POraText):sword;cdecl;external ocilib name 'OCIExtractFromFile';

  function OCIExtractFromStr(hndl:Pdvoid; err:POCIError; flag:ub4; input:POraText):sword;cdecl;external ocilib name 'OCIExtractFromStr';

  function OCIExtractToInt(hndl:Pdvoid; err:POCIError; keyname:POraText; valno:uword; retval:Psb4):sword;cdecl;external ocilib name 'OCIExtractToInt';

  function OCIExtractToBool(hndl:Pdvoid; err:POCIError; keyname:POraText; valno:uword; retval:Pub1):sword;cdecl;external ocilib name 'OCIExtractToBool';

  function OCIExtractToStr(hndl:Pdvoid; err:POCIError; keyname:POraText; valno:uword; retval:POraText; 
             buflen:uword):sword;cdecl;external ocilib name 'OCIExtractToStr';

  function OCIExtractToOCINum(hndl:Pdvoid; err:POCIError; keyname:POraText; valno:uword; retval:POCINumber):sword;cdecl;external ocilib name 'OCIExtractToOCINum';

  function OCIExtractToList(hndl:Pdvoid; err:POCIError; numkeys:Puword):sword;cdecl;external ocilib name 'OCIExtractToList';

  function OCIExtractFromList(hndl:Pdvoid; err:POCIError; index:uword; var name:POraText; _type:Pub1;
             numvals:Puword; values:PPPdvoid):sword;cdecl;external ocilib name 'OCIExtractFromList';

  { Memory Related Service Interfaces  }
  function OCIMemoryAlloc(hdl:Pdvoid; err:POCIError; mem:PPdvoid; dur:OCIDuration; size:ub4; 
             flags:ub4):sword;cdecl;external ocilib name 'OCIMemoryAlloc';

  function OCIMemoryResize(hdl:Pdvoid; err:POCIError; mem:PPdvoid; newsize:ub4; flags:ub4):sword;cdecl;external ocilib name 'OCIMemoryResize';

  function OCIMemoryFree(hdl:Pdvoid; err:POCIError; mem:Pdvoid):sword;cdecl;external ocilib name 'OCIMemoryFree';

  function OCIContextSetValue(hdl:Pdvoid; err:POCIError; duration:OCIDuration; key:Pub1; keylen:ub1; 
             ctx_value:Pdvoid):sword;cdecl;external ocilib name 'OCIContextSetValue';

  function OCIContextGetValue(hdl:Pdvoid; err:POCIError; key:Pub1; keylen:ub1; ctx_value:PPdvoid):sword;cdecl;external ocilib name 'OCIContextGetValue';

  function OCIContextClearValue(hdl:Pdvoid; err:POCIError; key:Pub1; keylen:ub1):sword;cdecl;external ocilib name 'OCIContextClearValue';

  function OCIContextGenerateKey(hdl:Pdvoid; err:POCIError; key:Pub4):sword;cdecl;external ocilib name 'OCIContextGenerateKey';

  function OCIMemorySetCurrentIDs(hdl:Pdvoid; err:POCIError; curr_session_id:ub4; curr_trans_id:ub4; curr_stmt_id:ub4):sword;cdecl;external ocilib name 'OCIMemorySetCurrentIDs';

  function OCIPicklerTdsCtxInit(env:POCIEnv; err:POCIError; var tdsc:POCIPicklerTdsCtx):sword;cdecl;external ocilib name 'OCIPicklerTdsCtxInit';

  function OCIPicklerTdsCtxFree(env:POCIEnv; err:POCIError; tdsc:POCIPicklerTdsCtx):sword;cdecl;external ocilib name 'OCIPicklerTdsCtxFree';

  function OCIPicklerTdsInit(env:POCIEnv; err:POCIError; tdsc:POCIPicklerTdsCtx; var tdsh:POCIPicklerTds):sword;cdecl;external ocilib name 'OCIPicklerTdsInit';

  function OCIPicklerTdsFree(env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds):sword;cdecl;external ocilib name 'OCIPicklerTdsFree';

  function OCIPicklerTdsCreateElementNumber(env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; prec:ub1; scale:sb1; 
             elt:POCIPicklerTdsElement):sword;cdecl;external ocilib name 'OCIPicklerTdsCreateElementNumber';

  function OCIPicklerTdsCreateElementChar(env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; len:ub2; elt:POCIPicklerTdsElement):sword;cdecl;external ocilib name 'OCIPicklerTdsCreateElementChar';

  function OCIPicklerTdsCreateElementVarchar(env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; len:ub2; elt:POCIPicklerTdsElement):sword;cdecl;external ocilib name 'OCIPicklerTdsCreateElementVarchar';

  function OCIPicklerTdsCreateElementRaw(env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; len:ub2; elt:POCIPicklerTdsElement):sword;cdecl;external ocilib name 'OCIPicklerTdsCreateElementRaw';

  function OCIPicklerTdsCreateElement(env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; dty:OCITypeCode; elt:POCIPicklerTdsElement):sword;cdecl;external ocilib name 'OCIPicklerTdsCreateElement';

  function OCIPicklerTdsAddAttr(env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; elt:OCIPicklerTdsElement):sword;cdecl;external ocilib name 'OCIPicklerTdsAddAttr';

  function OCIPicklerTdsGenerate(env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds):sword;cdecl;external ocilib name 'OCIPicklerTdsGenerate';

  function OCIPicklerTdsGetAttr(env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; attrno:ub1; typ:POCITypeCode;
             len:Pub2):sword;cdecl;external ocilib name 'OCIPicklerTdsGetAttr';

  function OCIPicklerFdoInit(env:POCIEnv; err:POCIError; var fdoh:POCIPicklerFdo):sword;cdecl;external ocilib name 'OCIPicklerFdoInit';

  function OCIPicklerFdoFree(env:POCIEnv; err:POCIError; fdoh:POCIPicklerFdo):sword;cdecl;external ocilib name 'OCIPicklerFdoFree';

  function OCIPicklerImageInit(env:POCIEnv; err:POCIError; fdoh:POCIPicklerFdo; tdsh:POCIPicklerTds; var imgh:POCIPicklerImage):sword;cdecl;external ocilib name 'OCIPicklerImageInit';

  function OCIPicklerImageFree(env:POCIEnv; err:POCIError; imgh:POCIPicklerImage):sword;cdecl;external ocilib name 'OCIPicklerImageFree';

  function OCIPicklerImageAddScalar(env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; scalar:Pdvoid; len:ub4):sword;cdecl;external ocilib name 'OCIPicklerImageAddScalar';

  function OCIPicklerImageAddNullScalar(env:POCIEnv; err:POCIError; imgh:POCIPicklerImage):sword;cdecl;external ocilib name 'OCIPicklerImageAddNullScalar';

  function OCIPicklerImageGenerate(env:POCIEnv; err:POCIError; imgh:POCIPicklerImage):sword;cdecl;external ocilib name 'OCIPicklerImageGenerate';

  function OCIPicklerImageGetScalarSize(env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; attrno:ub4; size:Pub4):sword;cdecl;external ocilib name 'OCIPicklerImageGetScalarSize';

  function OCIPicklerImageGetScalar(env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; attrno:ub4; buf:Pdvoid; 
             len:Pub4; ind:POCIInd):sword;cdecl;external ocilib name 'OCIPicklerImageGetScalar';

  function OCIPicklerImageCollBegin(env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; colltdsh:POCIPicklerTds):sword;cdecl;external ocilib name 'OCIPicklerImageCollBegin';

  function OCIPicklerImageCollAddScalar(env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; scalar:Pdvoid; buflen:ub4; 
             ind:OCIInd):sword;cdecl;external ocilib name 'OCIPicklerImageCollAddScalar';

  function OCIPicklerImageCollEnd(env:POCIEnv; err:POCIError; imgh:POCIPicklerImage):sword;cdecl;external ocilib name 'OCIPicklerImageCollEnd';

  { should take svcctx for locator stuff  }
  function OCIPicklerImageCollBeginScan(env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; coll_tdsh:POCIPicklerTds; attrnum:ub4;
             startidx:ub4; ind:POCIInd):sword;cdecl;external ocilib name 'OCIPicklerImageCollBeginScan';

  function OCIPicklerImageCollGetScalarSize(env:POCIEnv; err:POCIError; coll_tdsh:POCIPicklerTds; size:Pub4):sword;cdecl;external ocilib name 'OCIPicklerImageCollGetScalarSize';

  function OCIPicklerImageCollGetScalar(env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; buf:Pdvoid; buflen:Pub4; 
             ind:POCIInd):sword;cdecl;external ocilib name 'OCIPicklerImageCollGetScalar';

  function OCIAnyDataGetType(svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; tc:POCITypeCode; var _type:POCIType):sword;cdecl;external ocilib name 'OCIAnyDataGetType';

  function OCIAnyDataIsNull(svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; isnull:Pboolean):sword;cdecl;external ocilib name 'OCIAnyDataIsNull';

  function OCIAnyDataConvert(svchp:POCISvcCtx; errhp:POCIError; tc:OCITypeCode; _type:POCIType; dur:OCIDuration; 
             ind:Pdvoid; data_val:Pdvoid; len:ub4; var sdata:POCIAnyData):sword;cdecl;external ocilib name 'OCIAnyDataConvert';

  function OCIAnyDataBeginCreate(svchp:POCISvcCtx; errhp:POCIError; tc:OCITypeCode; _type:POCIType; dur:OCIDuration; 
             var sdata:POCIAnyData):sword;cdecl;external ocilib name 'OCIAnyDataBeginCreate';

  function OCIAnyDataDestroy(svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData):sword;cdecl;external ocilib name 'OCIAnyDataDestroy';

  function OCIAnyDataAttrSet(svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; tc:OCITypeCode; _type:POCIType; 
             ind:Pdvoid; attr_val:Pdvoid; length:ub4; is_any:boolean):sword;cdecl;external ocilib name 'OCIAnyDataAttrSet';

  function OCIAnyDataCollAddElem(svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; tc:OCITypeCode; _type:POCIType; 
             ind:Pdvoid; attr_val:Pdvoid; length:ub4; is_any:boolean; last_elem:boolean):sword;cdecl;external ocilib name 'OCIAnyDataCollAddElem';

  function OCIAnyDataEndCreate(svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData):sword;cdecl;external ocilib name 'OCIAnyDataEndCreate';

  function OCIAnyDataAccess(svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; tc:OCITypeCode; _type:POCIType; 
             ind:Pdvoid; attr_val:Pdvoid; length:Pub4):sword;cdecl;external ocilib name 'OCIAnyDataAccess';

  function OCIAnyDataGetCurrAttrNum(svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; attrnum:Pub4):sword;cdecl;external ocilib name 'OCIAnyDataGetCurrAttrNum';

  function OCIAnyDataAttrGet(svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; tc:OCITypeCode; _type:POCIType; 
             ind:Pdvoid; attr_val:Pdvoid; length:Pub4; is_any:boolean):sword;cdecl;external ocilib name 'OCIAnyDataAttrGet';

  function OCIAnyDataCollGetElem(svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; tc:OCITypeCode; _type:POCIType; 
             ind:Pdvoid; celem_val:Pdvoid; length:Pub4; is_any:boolean):sword;cdecl;external ocilib name 'OCIAnyDataCollGetElem';

{$ELSE}
var OCIInitialize : function (mode:ub4; ctxp:Pdvoid; malocfp:tmalocfp; ralocfp:tralocfp;mfreefp:tmfreefp ):sword;cdecl;

   OCITerminate : function (mode:ub4):sword;cdecl;

   OCIEnvCreate : function (var envp:POCIEnv; mode:ub4; ctxp:Pdvoid; malocfp:tmalocfp; ralocfp:tralocfp;
             mfreefp:tmfreefp; xtramem_sz:size_t; usrmempp:PPdvoid):sword;cdecl;

   OCIEnvNlsCreate : function (var envp:POCIEnv; mode:ub4; ctxp:Pdvoid; malocfp:tmalocfp; ralocfp:tralocfp;
             mfreefp:tmfreefp; xtramem_sz:size_t; usrmempp:PPdvoid; charset:ub2; ncharset:ub2):sword;cdecl;

   OCIFEnvCreate : function (var envp:POCIEnv; mode:ub4; ctxp:Pdvoid; malocfp:tmalocfp; ralocfp:tralocfp;
             mfreefp:tmfreefp; xtramem_sz:size_t; usrmempp:PPdvoid; fupg:Pdvoid):sword;cdecl;

   OCIHandleAlloc : function (parenth:Pdvoid; var hndlpp:Pdvoid; _type:ub4; xtramem_sz:size_t; usrmempp:PPdvoid):sword;cdecl;

   OCIHandleFree : function (hndlp:Pdvoid; _type:ub4):sword;cdecl;

   OCIDescriptorAlloc : function (parenth:Pdvoid; descpp:PPdvoid; _type:ub4; xtramem_sz:size_t; usrmempp:PPdvoid):sword;cdecl;

   OCIDescriptorFree : function (descp:Pdvoid; _type:ub4):sword;cdecl;

   OCIEnvInit : function (var envp:POCIEnv; mode:ub4; xtramem_sz:size_t; usrmempp:PPdvoid):sword;cdecl;

   OCIServerAttach : function (srvhp:POCIServer; errhp:POCIError; dblink:POraText; dblink_len:sb4; mode:ub4):sword;cdecl;

   OCIServerDetach : function (srvhp:POCIServer; errhp:POCIError; mode:ub4):sword;cdecl;

   OCISessionBegin : function (svchp:POCISvcCtx; errhp:POCIError; usrhp:POCISession; credt:ub4; mode:ub4):sword;cdecl;

   OCISessionEnd : function (svchp:POCISvcCtx; errhp:POCIError; usrhp:POCISession; mode:ub4):sword;cdecl;

   OCILogon : function (envhp:POCIEnv; errhp:POCIError;var svchp:POCISvcCtx; username:POraText; uname_len:ub4;
             password:POraText; passwd_len:ub4; dbname:POraText; dbname_len:ub4):sword;cdecl;

   OCILogon2 : function (envhp:POCIEnv; errhp:POCIError; var svchp:POCISvcCtx; username:POraText; uname_len:ub4;
             password:POraText; passwd_len:ub4; dbname:POraText; dbname_len:ub4; mode:ub4):sword;cdecl;

   OCILogoff : function (svchp:POCISvcCtx; errhp:POCIError):sword;cdecl;

   OCIPasswordChange : function (svchp:POCISvcCtx; errhp:POCIError; user_name:POraText; usernm_len:ub4; opasswd:POraText;
             opasswd_len:ub4; npasswd:POraText; npasswd_len:ub4; mode:ub4):sword;cdecl;

   OCIStmtPrepare : function (stmtp:POCIStmt; errhp:POCIError; stmt:POraText; stmt_len:ub4; language:ub4;
             mode:ub4):sword;cdecl;

   OCIStmtPrepare2 : function (svchp:POCISvcCtx; var stmtp:POCIStmt; errhp:POCIError; stmt:POraText; stmt_len:ub4;
             key:POraText; key_len:ub4; language:ub4; mode:ub4):sword;cdecl;

   OCIStmtRelease : function (stmtp:POCIStmt; errhp:POCIError; key:POraText; key_len:ub4; mode:ub4):sword;cdecl;

   OCIBindByPos : function (stmtp:POCIStmt; var bindp:POCIBind; errhp:POCIError; position:ub4; valuep:Pdvoid;
             value_sz:sb4; dty:ub2; indp:Pdvoid; alenp:Pub2; rcodep:Pub2;
             maxarr_len:ub4; curelep:Pub4; mode:ub4):sword;cdecl;

   OCIBindByName : function (stmtp:POCIStmt; var bindp: POCIBind; errhp:POCIError; placeholder:POraText; placeh_len:sb4;
             valuep:Pdvoid; value_sz:sb4; dty:ub2; indp:Pdvoid; alenp:Pub2;
             rcodep:Pub2; maxarr_len:ub4; curelep:Pub4; mode:ub4):sword;cdecl;

   OCIBindObject : function (bindp:POCIBind; errhp:POCIError; _type:POCIType; pgvpp:PPdvoid; pvszsp:Pub4;
             indpp:PPdvoid; indszp:Pub4):sword;cdecl;

   OCIBindDynamic : function (bindp:POCIBind; errhp:POCIError; ictxp:Pdvoid; icbfp:OCICallbackInBind; octxp:Pdvoid;
             ocbfp:OCICallbackOutBind):sword;cdecl;

   OCIBindArrayOfStruct : function (bindp:POCIBind; errhp:POCIError; pvskip:ub4; indskip:ub4; alskip:ub4;
             rcskip:ub4):sword;cdecl;

   OCIStmtGetPieceInfo : function (stmtp:POCIStmt; errhp:POCIError; hndlpp:PPdvoid; typep:Pub4; in_outp:Pub1;
             iterp:Pub4; idxp:Pub4; piecep:Pub1):sword;cdecl;

   OCIStmtSetPieceInfo : function (hndlp:Pdvoid; _type:ub4; errhp:POCIError; bufp:Pdvoid; alenp:Pub4;
             piece:ub1; indp:Pdvoid; rcodep:Pub2):sword;cdecl;

   OCIStmtExecute : function (svchp:POCISvcCtx; stmtp:POCIStmt; errhp:POCIError; iters:ub4; rowoff:ub4;
             snap_in:POCISnapshot; snap_out:POCISnapshot; mode:ub4):sword;cdecl;

   OCIDefineByPos : function (stmtp:POCIStmt; var defnp:POCIDefine; errhp:POCIError; position:ub4; valuep:Pdvoid;
             value_sz:sb4; dty:ub2; indp:Pdvoid; rlenp:Pub2; rcodep:Pub2;
             mode:ub4):sword;cdecl;

   OCIDefineObject : function (defnp:POCIDefine; errhp:POCIError; _type:POCIType; pgvpp:PPdvoid; pvszsp:Pub4;
             indpp:PPdvoid; indszp:Pub4):sword;cdecl;

   OCIDefineDynamic : function (defnp:POCIDefine; errhp:POCIError; octxp:Pdvoid; ocbfp:OCICallbackDefine):sword;cdecl;

   OCIRowidToChar : function (rowidDesc:POCIRowid; outbfp:POraText; outbflp:Pub2; errhp:POCIError):sword;cdecl;

   OCIDefineArrayOfStruct : function (defnp:POCIDefine; errhp:POCIError; pvskip:ub4; indskip:ub4; rlskip:ub4;
             rcskip:ub4):sword;cdecl;

   OCIStmtFetch : function (stmtp:POCIStmt; errhp:POCIError; nrows:ub4; orientation:ub2; mode:ub4):sword;cdecl;

   OCIStmtFetch2 : function (stmtp:POCIStmt; errhp:POCIError; nrows:ub4; orientation:ub2; scrollOffset:sb4;
             mode:ub4):sword;cdecl;

   OCIStmtGetBindInfo : function (stmtp:POCIStmt; errhp:POCIError; size:ub4; startloc:ub4; found:Psb4;
             bvnp:array of POraText; bvnl:array of ub1; invp:array of POraText; inpl:array of ub1; dupl:array of ub1;
             var hndl:POCIBind):sword;cdecl;

   OCIDescribeAny : function (svchp:POCISvcCtx; errhp:POCIError; objptr:Pdvoid; objnm_len:ub4; objptr_typ:ub1;
             info_level:ub1; objtyp:ub1; dschp:POCIDescribe):sword;cdecl;

   OCIParamGet : function (hndlp:Pdvoid; htype:ub4; errhp:POCIError; var parmdpp:Pdvoid; pos:ub4):sword;cdecl;

   OCIParamSet : function (hdlp:Pdvoid; htyp:ub4; errhp:POCIError; dscp:Pdvoid; dtyp:ub4;
             pos:ub4):sword;cdecl;

   OCITransStart : function (svchp:POCISvcCtx; errhp:POCIError; timeout:uword; flags:ub4):sword;cdecl;

   OCITransDetach : function (svchp:POCISvcCtx; errhp:POCIError; flags:ub4):sword;cdecl;

   OCITransCommit : function (svchp:POCISvcCtx; errhp:POCIError; flags:ub4):sword;cdecl;

   OCITransRollback : function (svchp:POCISvcCtx; errhp:POCIError; flags:ub4):sword;cdecl;

   OCITransPrepare : function (svchp:POCISvcCtx; errhp:POCIError; flags:ub4):sword;cdecl;

   OCITransMultiPrepare : function (svchp:POCISvcCtx; numBranches:ub4; var txns:POCITrans; var errhp:POCIError):sword;cdecl;

   OCITransForget : function (svchp:POCISvcCtx; errhp:POCIError; flags:ub4):sword;cdecl;

   OCIErrorGet : function (hndlp:Pdvoid; recordno:ub4; sqlstate:POraText; var errcodep:sb4; bufp:POraText;
             bufsiz:ub4; _type:ub4):sword;cdecl;

   OCILobAppend : function (svchp:POCISvcCtx; errhp:POCIError; dst_locp:POCILobLocator; src_locp:POCILobLocator):sword;cdecl;

   OCILobAssign : function (envhp:POCIEnv; errhp:POCIError; src_locp:POCILobLocator; var dst_locpp:POCILobLocator):sword;cdecl;

   OCILobCharSetForm : function (envhp:POCIEnv; errhp:POCIError; locp:POCILobLocator; csfrm:Pub1):sword;cdecl;

   OCILobCharSetId : function (envhp:POCIEnv; errhp:POCIError; locp:POCILobLocator; csid:Pub2):sword;cdecl;

   OCILobCopy : function (svchp:POCISvcCtx; errhp:POCIError; dst_locp:POCILobLocator; src_locp:POCILobLocator; amount:ub4;
             dst_offset:ub4; src_offset:ub4):sword;cdecl;

   OCILobCreateTemporary : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; csid:ub2; csfrm:ub1;
             lobtype:ub1; cache:boolean; duration:OCIDuration):sword;cdecl;

   OCILobClose : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator):sword;cdecl;

   OCILobDisableBuffering : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator):sword;cdecl;

   OCILobEnableBuffering : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator):sword;cdecl;

   OCILobErase : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; amount:Pub4; offset:ub4):sword;cdecl;

   OCILobFileClose : function (svchp:POCISvcCtx; errhp:POCIError; filep:POCILobLocator):sword;cdecl;

   OCILobFileCloseAll : function (svchp:POCISvcCtx; errhp:POCIError):sword;cdecl;

   OCILobFileExists : function (svchp:POCISvcCtx; errhp:POCIError; filep:POCILobLocator; flag:Pboolean):sword;cdecl;

   OCILobFileGetName : function (envhp:POCIEnv; errhp:POCIError; filep:POCILobLocator; dir_alias:POraText; d_length:Pub2;
             filename:POraText; f_length:Pub2):sword;cdecl;

   OCILobFileIsOpen : function (svchp:POCISvcCtx; errhp:POCIError; filep:POCILobLocator; flag:Pboolean):sword;cdecl;

   OCILobFileOpen : function (svchp:POCISvcCtx; errhp:POCIError; filep:POCILobLocator; mode:ub1):sword;cdecl;

   OCILobFileSetName : function (envhp:POCIEnv; errhp:POCIError; var filepp:POCILobLocator; dir_alias:POraText; d_length:ub2;
             filename:POraText; f_length:ub2):sword;cdecl;

   OCILobFlushBuffer : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; flag:ub4):sword;cdecl;

   OCILobFreeTemporary : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator):sword;cdecl;

   OCILobGetChunkSize : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; chunksizep:Pub4):sword;cdecl;

   OCILobGetLength : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; lenp:Pub4):sword;cdecl;

   OCILobIsEqual : function (envhp:POCIEnv; x:POCILobLocator; y:POCILobLocator; is_equal:Pboolean):sword;cdecl;

   OCILobIsOpen : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; flag:Pboolean):sword;cdecl;

   OCILobIsTemporary : function (envp:POCIEnv; errhp:POCIError; locp:POCILobLocator; is_temporary:Pboolean):sword;cdecl;

   OCILobLoadFromFile : function (svchp:POCISvcCtx; errhp:POCIError; dst_locp:POCILobLocator; src_filep:POCILobLocator; amount:ub4;
             dst_offset:ub4; src_offset:ub4):sword;cdecl;

   OCILobLocatorAssign : function (svchp:POCISvcCtx; errhp:POCIError; src_locp:POCILobLocator; var dst_locpp:POCILobLocator):sword;cdecl;

   OCILobLocatorIsInit : function (envhp:POCIEnv; errhp:POCIError; locp:POCILobLocator; is_initialized:Pboolean):sword;cdecl;

   OCILobOpen : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; mode:ub1):sword;cdecl;

   OCILobRead : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; amtp:Pub4; offset:ub4;
             bufp:Pdvoid; bufl:ub4; ctxp:Pdvoid; cbfp:OCICallbackLobRead; csid:ub2;
             csfrm:ub1):sword;cdecl;

   OCILobTrim : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; newlen:ub4):sword;cdecl;

   OCILobWrite : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; amtp:Pub4; offset:ub4;
             bufp:Pdvoid; buflen:ub4; piece:ub1; ctxp:Pdvoid; cbfp:OCICallbackLobWrite;
             csid:ub2; csfrm:ub1):sword;cdecl;

   OCILobWriteAppend : function (svchp:POCISvcCtx; errhp:POCIError; lobp:POCILobLocator; amtp:Pub4; bufp:Pdvoid;
             bufl:ub4; piece:ub1; ctxp:Pdvoid; cbfp:OCICallbackLobWrite; csid:ub2;
             csfrm:ub1):sword;cdecl;

   OCIBreak : function (hndlp:Pdvoid; errhp:POCIError):sword;cdecl;

   OCIReset : function (hndlp:Pdvoid; errhp:POCIError):sword;cdecl;

   OCIServerVersion : function (hndlp:Pdvoid; errhp:POCIError; bufp:POraText; bufsz:ub4; hndltype:ub1):sword;cdecl;

   OCIServerRelease : function (hndlp:Pdvoid; errhp:POCIError; bufp:POraText; bufsz:ub4; hndltype:ub1;
             version:Pub4):sword;cdecl;

   OCIAttrGet : function (trgthndlp:Pdvoid; trghndltyp:ub4; attributep:Pdvoid; sizep:Pub4; attrtype:ub4;
             errhp:POCIError):sword;cdecl;

   OCIAttrSet : function (trgthndlp:Pdvoid; trghndltyp:ub4; attributep:Pdvoid; size:ub4; attrtype:ub4;
             errhp:POCIError):sword;cdecl;

   OCISvcCtxToLda : function (svchp:POCISvcCtx; errhp:POCIError; ldap:PLda_Def):sword;cdecl;

   OCILdaToSvcCtx : function (var svchpp:POCISvcCtx; errhp:POCIError; ldap:PLda_Def):sword;cdecl;

   OCIResultSetToStmt : function (rsetdp:POCIResult; errhp:POCIError):sword;cdecl;

   OCIFileClose : function (hndl:Pdvoid; err:POCIError; filep:POCIFileObject):sword;cdecl;

//   OCIUserCallbackRegister : function (hndlp:Pdvoid; _type:ub4; ehndlp:Pdvoid; callback:OCIUserCallback; ctxp:Pdvoid;
//             fcode:ub4; when:ub4; ucbDesc:POCIUcb):sword;cdecl;external ocilib name 'OCIUserCallbackRegister';

//   OCIUserCallbackGet : function (hndlp:Pdvoid; _type:ub4; ehndlp:Pdvoid; fcode:ub4; when:ub4;
//             callbackp:POCIUserCallback; ctxpp:PPdvoid; ucbDesc:POCIUcb):sword;cdecl;external ocilib name 'OCIUserCallbackGet';

   OCISharedLibInit : function (metaCtx:Pdvoid; libCtx:Pdvoid; argfmt:ub4; argc:sword; argv:PPdvoid;
             envCallback:OCIEnvCallbackType):sword;cdecl;

   OCIFileExists : function (hndl:Pdvoid; err:POCIError; filename:POraText; path:POraText; flag:Pub1):sword;cdecl;

   OCIFileFlush : function (hndl:Pdvoid; err:POCIError; filep:POCIFileObject):sword;cdecl;

   OCIFileGetLength : function (hndl:Pdvoid; err:POCIError; filename:POraText; path:POraText; lenp:Pubig_ora):sword;cdecl;

   OCIFileInit : function (hndl:Pdvoid; err:POCIError):sword;cdecl;

   OCIFileOpen : function (hndl:Pdvoid; err:POCIError; var filep:POCIFileObject; filename:POraText; path:POraText;
             mode:ub4; create:ub4; _type:ub4):sword;cdecl;

   OCIFileRead : function (hndl:Pdvoid; err:POCIError; filep:POCIFileObject; bufp:Pdvoid; bufl:ub4;
             bytesread:Pub4):sword;cdecl;

   OCIFileSeek : function (hndl:Pdvoid; err:POCIError; filep:POCIFileObject; origin:uword; offset:ubig_ora;
             dir:sb1):sword;cdecl;

   OCIFileTerm : function (hndl:Pdvoid; err:POCIError):sword;cdecl;

   OCIFileWrite : function (hndl:Pdvoid; err:POCIError; filep:POCIFileObject; bufp:Pdvoid; buflen:ub4;
             byteswritten:Pub4):sword;cdecl;

{$ifdef ORAXB8_DEFINED}

   OCILobCopy2 : function (svchp:POCISvcCtx; errhp:POCIError; dst_locp:POCILobLocator; src_locp:POCILobLocator; amount:oraub8;
             dst_offset:oraub8; src_offset:oraub8):sword;cdecl;

   OCILobErase2 : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; amount:Poraub8; offset:oraub8):sword;cdecl;

   OCILobGetLength2 : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; lenp:Poraub8):sword;cdecl;

   OCILobLoadFromFile2 : function (svchp:POCISvcCtx; errhp:POCIError; dst_locp:POCILobLocator; src_filep:POCILobLocator; amount:oraub8;
             dst_offset:oraub8; src_offset:oraub8):sword;cdecl;

   OCILobRead2 : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; byte_amtp:Poraub8; char_amtp:Poraub8;
             offset:oraub8; bufp:Pdvoid; bufl:oraub8; piece:ub1; ctxp:Pdvoid;
             cbfp:OCICallbackLobRead2; csid:ub2; csfrm:ub1):sword;cdecl;

   OCILobArrayRead : function (svchp:POCISvcCtx; errhp:POCIError; array_iter:Pub4; lobp_arr:PPOCILobLocator; byte_amt_arr:Poraub8;
             char_amt_arr:Poraub8; offset_arr:Poraub8; bufp_arr:PPdvoid; bufl_arr:Poraub8; piece:ub1;
             ctxp:Pdvoid; cbfp:OCICallbackLobArrayRead; csid:ub2; csfrm:ub1):sword;cdecl;

   OCILobTrim2 : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; newlen:oraub8):sword;cdecl;

   OCILobWrite2 : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; byte_amtp:Poraub8; char_amtp:Poraub8;
             offset:oraub8; bufp:Pdvoid; buflen:oraub8; piece:ub1; ctxp:Pdvoid;
             cbfp:OCICallbackLobWrite2; csid:ub2; csfrm:ub1):sword;cdecl;

   OCILobArrayWrite : function (svchp:POCISvcCtx; errhp:POCIError; array_iter:Pub4; lobp_arr:PPOCILobLocator; byte_amt_arr:Poraub8;
             char_amt_arr:Poraub8; offset_arr:Poraub8; bufp_arr:PPdvoid; bufl_arr:Poraub8; piece:ub1;
             ctxp:Pdvoid; cbfp:OCICallbackLobArrayWrite; csid:ub2; csfrm:ub1):sword;cdecl;

   OCILobWriteAppend2 : function (svchp:POCISvcCtx; errhp:POCIError; lobp:POCILobLocator; byte_amtp:Poraub8; char_amtp:Poraub8;
             bufp:Pdvoid; bufl:oraub8; piece:ub1; ctxp:Pdvoid; cbfp:OCICallbackLobWrite2;
             csid:ub2; csfrm:ub1):sword;cdecl;

   OCILobGetStorageLimit : function (svchp:POCISvcCtx; errhp:POCIError; lobp:POCILobLocator; limitp:Poraub8):sword;cdecl;

{$endif}
  {
   ** Initialize the security package
    }

   OCISecurityInitialize : function (sechandle:POCISecurity; error_handle:POCIError):sword;cdecl;

   OCISecurityTerminate : function (sechandle:POCISecurity; error_handle:POCIError):sword;cdecl;

   OCISecurityOpenWallet : function (osshandle:POCISecurity; error_handle:POCIError; wrllen:size_t; wallet_resource_locator:POraText; pwdlen:size_t;
             password:POraText; wallet:PnzttWallet):sword;cdecl;

   OCISecurityCloseWallet : function (osshandle:POCISecurity; error_handle:POCIError; wallet:PnzttWallet):sword;cdecl;

   OCISecurityCreateWallet : function (osshandle:POCISecurity; error_handle:POCIError; wrllen:size_t; wallet_resource_locator:POraText; pwdlen:size_t;
             password:POraText; wallet:PnzttWallet):sword;cdecl;

   OCISecurityDestroyWallet : function (osshandle:POCISecurity; error_handle:POCIError; wrllen:size_t; wallet_resource_locator:POraText; pwdlen:size_t;
             password:POraText):sword;cdecl;

   OCISecurityStorePersona : function (osshandle:POCISecurity; error_handle:POCIError; var persona:PnzttPersona; wallet:PnzttWallet):sword;cdecl;

   OCISecurityOpenPersona : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona):sword;cdecl;

   OCISecurityClosePersona : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona):sword;cdecl;

   OCISecurityRemovePersona : function (osshandle:POCISecurity; error_handle:POCIError; var persona:PnzttPersona):sword;cdecl;

   OCISecurityCreatePersona : function (osshandle:POCISecurity; error_handle:POCIError; identity_type:nzttIdentType; cipher_type:nzttCipherType; desc:PnzttPersonaDesc;
             var persona:PnzttPersona):sword;cdecl;

   OCISecuritySetProtection : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; crypto_engine_function:nzttcef; data_unit_format:nztttdufmt;
             protection_info:PnzttProtInfo):sword;cdecl;

   OCISecurityGetProtection : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; crypto_engine_function:nzttcef; data_unit_format_ptr:Pnztttdufmt;
             protection_info:PnzttProtInfo):sword;cdecl;

   OCISecurityRemoveIdentity : function (osshandle:POCISecurity; error_handle:POCIError; var identity_ptr:PnzttIdentity):sword;cdecl;

   OCISecurityCreateIdentity : function (osshandle:POCISecurity; error_handle:POCIError; _type:nzttIdentType; desc:PnzttIdentityDesc; var identity_ptr:PnzttIdentity):sword;cdecl;

   OCISecurityAbortIdentity : function (osshandle:POCISecurity; error_handle:POCIError; var identity_ptr:PnzttIdentity):sword;cdecl;

   OCISecurityFreeIdentity : function (osshandle:POCISecurity; error_handle:POCIError; var identity_ptr:PnzttIdentity):sword;cdecl;

   OCISecurityStoreTrustedIdentity : function (osshandle:POCISecurity; error_handle:POCIError; var identity_ptr:PnzttIdentity; persona:PnzttPersona):sword;cdecl;

   OCISecuritySign : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; signature_state:nzttces; input_length:size_t;
             input:Pub1; buffer_block:PnzttBufferBlock):sword;cdecl;

   OCISecuritySignExpansion : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; inputlen:size_t; signature_length:Psize_t):sword;cdecl;

   OCISecurityVerify : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; signature_state:nzttces; siglen:size_t;
             signature:Pub1; extracted_message:PnzttBufferBlock; verified:Pboolean; validated:Pboolean; var signing_party_identity:PnzttIdentity):sword;cdecl;

   OCISecurityValidate : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; identity:PnzttIdentity; validated:Pboolean):sword;cdecl;

   OCISecuritySignDetached : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; signature_state:nzttces; input_length:size_t;
             input:Pub1; signature:PnzttBufferBlock):sword;cdecl;

   OCISecuritySignDetExpansion : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; input_length:size_t; required_buffer_length:Psize_t):sword;cdecl;

   OCISecurityVerifyDetached : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; signature_state:nzttces; data_length:size_t;
             data:Pub1; siglen:size_t; signature:Pub1; verified:Pboolean; validated:Pboolean;
             var signing_party_identity:PnzttIdentity):sword;cdecl;

   OCISecurity_PKEncrypt : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; number_of_recipients:size_t; recipient_list:PnzttIdentity;
             encryption_state:nzttces; input_length:size_t; input:Pub1; encrypted_data:PnzttBufferBlock):sword;cdecl;

   OCISecurityPKEncryptExpansion : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; number_recipients:size_t; input_length:size_t;
             buffer_length_required:Psize_t):sword;cdecl;

   OCISecurityPKDecrypt : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; encryption_state:nzttces; input_length:size_t;
             input:Pub1; encrypted_data:PnzttBufferBlock):sword;cdecl;

   OCISecurityEncrypt : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; encryption_state:nzttces; input_length:size_t;
             input:Pub1; encrypted_data:PnzttBufferBlock):sword;cdecl;

   OCISecurityEncryptExpansion : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; input_length:size_t; encrypted_data_length:Psize_t):sword;cdecl;

   OCISecurityDecrypt : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; decryption_state:nzttces; input_length:size_t;
             input:Pub1; decrypted_data:PnzttBufferBlock):sword;cdecl;

   OCISecurityEnvelope : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; number_of_recipients:size_t; identity:PnzttIdentity;
             encryption_state:nzttces; input_length:size_t; input:Pub1; enveloped_data:PnzttBufferBlock):sword;cdecl;

   OCISecurityDeEnvelope : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; decryption_state:nzttces; input_length:size_t;
             input:Pub1; output_message:PnzttBufferBlock; verified:Pboolean; validated:Pboolean; var sender_identity:PnzttIdentity):sword;cdecl;

   OCISecurityKeyedHash : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; hash_state:nzttces; input_length:size_t;
             input:Pub1; keyed_hash:PnzttBufferBlock):sword;cdecl;

   OCISecurityKeyedHashExpansion : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; input_length:size_t; required_buffer_length:Psize_t):sword;cdecl;

   OCISecurityHash : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; hash_state:nzttces; input:size_t;
             input_length:Pub1; hash:PnzttBufferBlock):sword;cdecl;

   OCISecurityHashExpansion : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; input_length:size_t; required_buffer_length:Psize_t):sword;cdecl;

   OCISecuritySeedRandom : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; seed_length:size_t; seed:Pub1):sword;cdecl;

   OCISecurityRandomBytes : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; number_of_bytes_desired:size_t; random_bytes:PnzttBufferBlock):sword;cdecl;

   OCISecurityRandomNumber : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; random_number_ptr:Puword):sword;cdecl;

   OCISecurityInitBlock : function (osshandle:POCISecurity; error_handle:POCIError; buffer_block:PnzttBufferBlock):sword;cdecl;

   OCISecurityReuseBlock : function (osshandle:POCISecurity; error_handle:POCIError; buffer_block:PnzttBufferBlock):sword;cdecl;

   OCISecurityPurgeBlock : function (osshandle:POCISecurity; error_handle:POCIError; buffer_block:PnzttBufferBlock):sword;cdecl;

   OCISecuritySetBlock : function (osshandle:POCISecurity; error_handle:POCIError; flags_to_set:uword; buffer_length:size_t; used_buffer_length:size_t;
             buffer:Pub1; buffer_block:PnzttBufferBlock):sword;cdecl;

   OCISecurityGetIdentity : function (osshandle:POCISecurity; error_handle:POCIError; namelen:size_t; distinguished_name:POraText; var identity:PnzttIdentity):sword;cdecl;

   OCIAQEnq : function (svchp:POCISvcCtx; errhp:POCIError; queue_name:POraText; enqopt:POCIAQEnqOptions; msgprop:POCIAQMsgProperties;
             payload_tdo:POCIType; payload:PPdvoid; payload_ind:PPdvoid; var msgid:POCIRaw; flags:ub4):sword;cdecl;

   OCIAQDeq : function (svchp:POCISvcCtx; errhp:POCIError; queue_name:POraText; deqopt:POCIAQDeqOptions; msgprop:POCIAQMsgProperties;
             payload_tdo:POCIType; payload:PPdvoid; payload_ind:PPdvoid; var msgid: POCIRaw; flags:ub4):sword;cdecl;

   OCIAQEnqArray : function (svchp:POCISvcCtx; errhp:POCIError; queue_name:POraText; enqopt:POCIAQEnqOptions; iters:Pub4;
             var msgprop:POCIAQMsgProperties; payload_tdo:POCIType; payload:PPdvoid; payload_ind:PPdvoid; var msgid:POCIRaw;
             ctxp:Pdvoid; enqcbfp:OCICallbackAQEnq; flags:ub4):sword;cdecl;

   OCIAQDeqArray : function (svchp:POCISvcCtx; errhp:POCIError; queue_name:POraText; deqopt:POCIAQDeqOptions; iters:Pub4;
             var msgprop:POCIAQMsgProperties; payload_tdo:POCIType; payload:PPdvoid; payload_ind:PPdvoid; var msgid:POCIRaw;
             ctxp:Pdvoid; deqcbfp:OCICallbackAQDeq; flags:ub4):sword;cdecl;

   OCIAQListen : function (svchp:POCISvcCtx; errhp:POCIError; var agent_list:POCIAQAgent; num_agents:ub4; wait:sb4;
             var agent:POCIAQAgent; flags:ub4):sword;cdecl;

   OCIAQListen2 : function (svchp:POCISvcCtx; errhp:POCIError; var agent_list:POCIAQAgent; num_agents:ub4; lopts:POCIAQListenOpts;
             var agent:POCIAQAgent; lmops:POCIAQLisMsgProps; flags:ub4):sword;cdecl;

   OCIExtractInit : function (hndl:Pdvoid; err:POCIError):sword;cdecl;

   OCIExtractTerm : function (hndl:Pdvoid; err:POCIError):sword;cdecl;

   OCIExtractReset : function (hndl:Pdvoid; err:POCIError):sword;cdecl;

   OCIExtractSetNumKeys : function (hndl:Pdvoid; err:POCIError; numkeys:uword):sword;cdecl;

   OCIExtractSetKey : function (hndl:Pdvoid; err:POCIError; name:POraText; _type:ub1; flag:ub4;
             defval:Pdvoid; intrange:Psb4; var strlist:POraText):sword;cdecl;

   OCIExtractFromFile : function (hndl:Pdvoid; err:POCIError; flag:ub4; filename:POraText):sword;cdecl;

   OCIExtractFromStr : function (hndl:Pdvoid; err:POCIError; flag:ub4; input:POraText):sword;cdecl;

   OCIExtractToInt : function (hndl:Pdvoid; err:POCIError; keyname:POraText; valno:uword; retval:Psb4):sword;cdecl;

   OCIExtractToBool : function (hndl:Pdvoid; err:POCIError; keyname:POraText; valno:uword; retval:Pub1):sword;cdecl;

   OCIExtractToStr : function (hndl:Pdvoid; err:POCIError; keyname:POraText; valno:uword; retval:POraText;
             buflen:uword):sword;cdecl;

   OCIExtractToOCINum : function (hndl:Pdvoid; err:POCIError; keyname:POraText; valno:uword; retval:POCINumber):sword;cdecl;

   OCIExtractToList : function (hndl:Pdvoid; err:POCIError; numkeys:Puword):sword;cdecl;

   OCIExtractFromList : function (hndl:Pdvoid; err:POCIError; index:uword; var name:POraText; _type:Pub1;
             numvals:Puword; values:PPPdvoid):sword;cdecl;

  { Memory Related Service Interfaces  }
   OCIMemoryAlloc : function (hdl:Pdvoid; err:POCIError; mem:PPdvoid; dur:OCIDuration; size:ub4;
             flags:ub4):sword;cdecl;

   OCIMemoryResize : function (hdl:Pdvoid; err:POCIError; mem:PPdvoid; newsize:ub4; flags:ub4):sword;cdecl;

   OCIMemoryFree : function (hdl:Pdvoid; err:POCIError; mem:Pdvoid):sword;cdecl;

   OCIContextSetValue : function (hdl:Pdvoid; err:POCIError; duration:OCIDuration; key:Pub1; keylen:ub1;
             ctx_value:Pdvoid):sword;cdecl;

   OCIContextGetValue : function (hdl:Pdvoid; err:POCIError; key:Pub1; keylen:ub1; ctx_value:PPdvoid):sword;cdecl;

   OCIContextClearValue : function (hdl:Pdvoid; err:POCIError; key:Pub1; keylen:ub1):sword;cdecl;

   OCIContextGenerateKey : function (hdl:Pdvoid; err:POCIError; key:Pub4):sword;cdecl;

   OCIMemorySetCurrentIDs : function (hdl:Pdvoid; err:POCIError; curr_session_id:ub4; curr_trans_id:ub4; curr_stmt_id:ub4):sword;cdecl;

   OCIPicklerTdsCtxInit : function (env:POCIEnv; err:POCIError; var tdsc:POCIPicklerTdsCtx):sword;cdecl;

   OCIPicklerTdsCtxFree : function (env:POCIEnv; err:POCIError; tdsc:POCIPicklerTdsCtx):sword;cdecl;

   OCIPicklerTdsInit : function (env:POCIEnv; err:POCIError; tdsc:POCIPicklerTdsCtx; var tdsh:POCIPicklerTds):sword;cdecl;

   OCIPicklerTdsFree : function (env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds):sword;cdecl;

   OCIPicklerTdsCreateElementNumber : function (env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; prec:ub1; scale:sb1;
             elt:POCIPicklerTdsElement):sword;cdecl;

   OCIPicklerTdsCreateElementChar : function (env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; len:ub2; elt:POCIPicklerTdsElement):sword;cdecl;

   OCIPicklerTdsCreateElementVarchar : function (env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; len:ub2; elt:POCIPicklerTdsElement):sword;cdecl;

   OCIPicklerTdsCreateElementRaw : function (env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; len:ub2; elt:POCIPicklerTdsElement):sword;cdecl;

   OCIPicklerTdsCreateElement : function (env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; dty:OCITypeCode; elt:POCIPicklerTdsElement):sword;cdecl;

   OCIPicklerTdsAddAttr : function (env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; elt:OCIPicklerTdsElement):sword;cdecl;

   OCIPicklerTdsGenerate : function (env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds):sword;cdecl;

   OCIPicklerTdsGetAttr : function (env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; attrno:ub1; typ:POCITypeCode;
             len:Pub2):sword;cdecl;

   OCIPicklerFdoInit : function (env:POCIEnv; err:POCIError; var fdoh:POCIPicklerFdo):sword;cdecl;

   OCIPicklerFdoFree : function (env:POCIEnv; err:POCIError; fdoh:POCIPicklerFdo):sword;cdecl;

   OCIPicklerImageInit : function (env:POCIEnv; err:POCIError; fdoh:POCIPicklerFdo; tdsh:POCIPicklerTds; var imgh:POCIPicklerImage):sword;cdecl;

   OCIPicklerImageFree : function (env:POCIEnv; err:POCIError; imgh:POCIPicklerImage):sword;cdecl;

   OCIPicklerImageAddScalar : function (env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; scalar:Pdvoid; len:ub4):sword;cdecl;

   OCIPicklerImageAddNullScalar : function (env:POCIEnv; err:POCIError; imgh:POCIPicklerImage):sword;cdecl;

   OCIPicklerImageGenerate : function (env:POCIEnv; err:POCIError; imgh:POCIPicklerImage):sword;cdecl;

   OCIPicklerImageGetScalarSize : function (env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; attrno:ub4; size:Pub4):sword;cdecl;

   OCIPicklerImageGetScalar : function (env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; attrno:ub4; buf:Pdvoid;
             len:Pub4; ind:POCIInd):sword;cdecl;

   OCIPicklerImageCollBegin : function (env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; colltdsh:POCIPicklerTds):sword;cdecl;

   OCIPicklerImageCollAddScalar : function (env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; scalar:Pdvoid; buflen:ub4;
             ind:OCIInd):sword;cdecl;

   OCIPicklerImageCollEnd : function (env:POCIEnv; err:POCIError; imgh:POCIPicklerImage):sword;cdecl;

  { should take svcctx for locator stuff  }
   OCIPicklerImageCollBeginScan : function (env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; coll_tdsh:POCIPicklerTds; attrnum:ub4;
             startidx:ub4; ind:POCIInd):sword;cdecl;

   OCIPicklerImageCollGetScalarSize : function (env:POCIEnv; err:POCIError; coll_tdsh:POCIPicklerTds; size:Pub4):sword;cdecl;

   OCIPicklerImageCollGetScalar : function (env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; buf:Pdvoid; buflen:Pub4;
             ind:POCIInd):sword;cdecl;

   OCIAnyDataGetType : function (svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; tc:POCITypeCode; var _type:POCIType):sword;cdecl;

   OCIAnyDataIsNull : function (svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; isnull:Pboolean):sword;cdecl;

   OCIAnyDataConvert : function (svchp:POCISvcCtx; errhp:POCIError; tc:OCITypeCode; _type:POCIType; dur:OCIDuration;
             ind:Pdvoid; data_val:Pdvoid; len:ub4; var sdata:POCIAnyData):sword;cdecl;

   OCIAnyDataBeginCreate : function (svchp:POCISvcCtx; errhp:POCIError; tc:OCITypeCode; _type:POCIType; dur:OCIDuration;
             var sdata:POCIAnyData):sword;cdecl;

   OCIAnyDataDestroy : function (svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData):sword;cdecl;

   OCIAnyDataAttrSet : function (svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; tc:OCITypeCode; _type:POCIType;
             ind:Pdvoid; attr_val:Pdvoid; length:ub4; is_any:boolean):sword;cdecl;

   OCIAnyDataCollAddElem : function (svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; tc:OCITypeCode; _type:POCIType;
             ind:Pdvoid; attr_val:Pdvoid; length:ub4; is_any:boolean; last_elem:boolean):sword;cdecl;

   OCIAnyDataEndCreate : function (svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData):sword;cdecl;

   OCIAnyDataAccess : function (svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; tc:OCITypeCode; _type:POCIType;
             ind:Pdvoid; attr_val:Pdvoid; length:Pub4):sword;cdecl;

   OCIAnyDataGetCurrAttrNum : function (svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; attrnum:Pub4):sword;cdecl;

   OCIAnyDataAttrGet : function (svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; tc:OCITypeCode; _type:POCIType;
             ind:Pdvoid; attr_val:Pdvoid; length:Pub4; is_any:boolean):sword;cdecl;

   OCIAnyDataCollGetElem : function (svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; tc:OCITypeCode; _type:POCIType;
             ind:Pdvoid; celem_val:Pdvoid; length:Pub4; is_any:boolean):sword;cdecl;

{$ENDIF}


  {------------------------ OCIAnyDataSet interfaces ------------------------- }
  {
     NAME
       OCIAnyDataSetBeginCreate - OCIAnyDataSet Begin Creation
     PARAMETERS
       svchp (IN/OUT) - The OCI service context.
       errhp (IN/OUT) - The OCI error handle. If there is an error, it is
                        recorded in errhp and this function returns OCI_ERROR.
                        Diagnostic information can be obtained by calling
                        OCIErrorGet().
       typecode       - typecode corresponding to the OCIAnyDataSet.
       type (IN)      - type corresponding to the OCIAnyDataSet. If the typecode
                        corresponds to a built-in type (OCI_TYPECODE_NUMBER etc.)
                        , this parameter can be NULL. It should be non NULL for
                        user defined types (OCI_TYPECODE_OBJECT,
                        OCI_TYPECODE_REF, collection types etc.)
       dur (IN)       - duration for which OCIAnyDataSet is allocated.
       data_set (OUT) - Initialized OCIAnyDataSet.
       RETURNS        - error code
     NOTES
       This call allocates an OCIAnyDataSet for the duration of dur and
       initializes it with the type information. The OCIAnyDataSet can hold
       multiple instances of the given type. For performance reasons, the 
       OCIAnyDataSet will end up pointing to the passed in OCIType parameter.
       It is the responsibility of the caller to ensure that the OCIType is
       longer lived (has allocation duration >= the duration of the OCIAnyData
       if the OCIType is a transient one, allocation/pin duration >= duration of
       the OCIAnyData if the OCIType is a persistent one).
  
   }
{$IFNDEF LinkDynamically}
  function OCIAnyDataSetBeginCreate(svchp:POCISvcCtx; errhp:POCIError; typecode:OCITypeCode; _type:POCIType; dur:OCIDuration;
             var data_set:POCIAnyDataSet):sword;cdecl;external ocilib name 'OCIAnyDataSetBeginCreate';
{$ELSE}
  OCIAnyDataSetBeginCreate : function (svchp:POCISvcCtx; errhp:POCIError; typecode:OCITypeCode; _type:POCIType; dur:OCIDuration;
             var data_set:POCIAnyDataSet):sword;cdecl;
{$ENDIF}

  {
     NAME
       OCIAnyDataSetDestroy  - OCIAnyDataSet Destroy
     DESCRIPTION
       This call frees the OCIAnyDataSet allocated using
       OCIAnyDataSetBeginCreate().
     RETURNS
       error code.
     PARAMETERS
       svchp (IN/OUT)    - The OCI service context.
       errhp (IN/OUT)    - The OCI Error handle.
       data_set (IN/OUT) - OCIAnyDataSet to be freed.
   }
{$IFNDEF LinkDynamically}
  function OCIAnyDataSetDestroy(svchp:POCISvcCtx; errhp:POCIError; data_set:POCIAnyDataSet):sword;cdecl;external ocilib name 'OCIAnyDataSetDestroy';
{$ELSE}
  OCIAnyDataSetDestroy : function (svchp:POCISvcCtx; errhp:POCIError; data_set:POCIAnyDataSet):sword;cdecl;
{$ENDIF}

  {
     NAME
       OCIAnyDataSetAddInstance - OCIAnyDataSet Add an instance
     DESCRIPTION
       This call adds a new skeleton instance to the OCIAnyDataSet and all the
       attributes of the instance are set to NULL. It returns this skeleton
       instance through the OCIAnyData parameter which can be constructed
       subsequently by invoking the OCIAnyData API.
     RETURNS
       error code.
     PARAMETERS
       svchp (IN/OUT)      - The OCI service context.
       errhp (IN/OUT)      - The OCI Error handle.
       data_set (IN/OUT)   - OCIAnyDataSet to which a new instance is added.
       data (IN/OUT)       - OCIAnyData corresponding to the newly added
                             instance. If (*data) is NULL, a new OCIAnyData will
                             be allocated for same duration as the OCIAnyDataSet.
                             If (*data) is not NULL, it will get reused. This
                             OCIAnyData can be subseqently constructed using the
                             OCIAnyDataConvert() call or it can be constructed
                             piece-wise using the OCIAnyDataAttrSet and
                             OCIAnyDataCollAddElem calls.
     NOTES
       No Destruction of the old value is done here. It is the responsibility of
       the caller to destroy the old value pointed to by (*data) and set (*data)
       to a null pointer before beginning to make a sequence of this call. No
       deep copying (of OCIType information nor the data part.) is done in the
       returned OCIAnyData. This OCIAnyData cannot be used beyond the allocation
       duration of the OCIAnyDataSet (it is like a reference into the
       OCIAnyDataSet). The returned OCIAnyData can be reused on subsequent calls
       to this function, to sequentially add new data instances to the
       OCIAnyDataSet.
   }
{$IFNDEF LinkDynamically}
  function OCIAnyDataSetAddInstance(svchp:POCISvcCtx; errhp:POCIError; data_set:POCIAnyDataSet; var data:POCIAnyData):sword;cdecl;external ocilib name 'OCIAnyDataSetAddInstance';
{$ELSE}
  OCIAnyDataSetAddInstance : function (svchp:POCISvcCtx; errhp:POCIError; data_set:POCIAnyDataSet; var data:POCIAnyData):sword;cdecl;
{$ENDIF}

  {
     NAME
       OCIAnyDataSetEndCreate - OCIAnyDataSet End Creation process.
     DESCRIPTION
       This call marks the end of OCIAnyDataSet creation. It should be called
       after constructing all of its instance(s).
     RETURNS
       error code.
     PARAMETERS
       svchp (IN/OUT)        - The OCI service context.
       errhp (IN/OUT)        - The OCI error handle. If there is an error, it is
                               recorded in errhp and this function returns
                               OCI_ERROR. Diagnostic information can be obtained
                               by calling OCIErrorGet().
       data_set (IN/OUT)     - OCIAnyDataSet that has been fully constructed.
   }
{$IFNDEF LinkDynamically}
  function OCIAnyDataSetEndCreate(svchp:POCISvcCtx; errhp:POCIError; data_set:POCIAnyDataSet):sword;cdecl;external ocilib name 'OCIAnyDataSetEndCreate';
{$ELSE}
  OCIAnyDataSetEndCreate : function (svchp:POCISvcCtx; errhp:POCIError; data_set:POCIAnyDataSet):sword;cdecl;
{$ENDIF}

  {
     NAME
       OCIAnyDataSetGetType - OCIAnyDataSet Get Type of an OCIAnyDataSet
     DESCRIPTION
       Gets the Type corresponding to an OCIAnyDataSet. It returns the actual
       pointer to the type maintained inside an OCIAnyDataSet. No copying is
       done for performance reasons. The client is responsible for not using
       this type once the OCIAnyDataSet is freed (or its duration ends).
     RETURNS
       error code.
     PARAMETERS
       svchp (IN/OUT)      - The OCI service context.
       errhp (IN/OUT)      - The OCI Error handle.
       data_set (IN)       - Initialized OCIAnyDataSet.
       tc (OUT)            - The typecode of the type.
       type (OUT)          - The type corresponding to the OCIAnyDataSet. This
                             could be null if the OCIAnyData corresponds to a
                             built-in type.
   }
{$IFNDEF LinkDynamically}
  function OCIAnyDataSetGetType(svchp:POCISvcCtx; errhp:POCIError; data_set:POCIAnyDataSet; tc:POCITypeCode; var _type:POCIType):sword;cdecl;external ocilib name 'OCIAnyDataSetGetType';
{$ELSE}
  OCIAnyDataSetGetType : function (svchp:POCISvcCtx; errhp:POCIError; data_set:POCIAnyDataSet; tc:POCITypeCode; var _type:POCIType):sword;cdecl;
{$ENDIF}

  {
    NAME
      OCIAnyDataSetGetCount - OCIAnyDataSet Get Count of instances.
    DESCRIPTION
      This call gets the number of instances in the OCIAnyDataSet.
    RETURNS
      error code.
    PARAMETERS
      svchp (IN/OUT)      - OCI Service Context
      errhp (IN/OUT)      - OCI Error handle
      data_set (IN)       - Well formed OCIAnyDataSet.
      count (OUT)         - number of instances in OCIAnyDataSet
   }
{$IFNDEF LinkDynamically}
  function OCIAnyDataSetGetCount(svchp:POCISvcCtx; errhp:POCIError; data_set:POCIAnyDataSet; count:Pub4):sword;cdecl;external ocilib name 'OCIAnyDataSetGetCount';
{$ELSE}
  OCIAnyDataSetGetCount : function (svchp:POCISvcCtx; errhp:POCIError; data_set:POCIAnyDataSet; count:Pub4):sword;cdecl;
{$ENDIF}

  {
    NAME
      OCIAnyDataSetGetInstance - OCIAnyDataSet Get next instance.
    DESCRIPTION
      Only sequential access to the instances in an OCIAnyDataSet is allowed.
      This call returns the OCIAnyData corresponding to an instance at the
      current position and updates the current position. Subsequently, the
      OCIAnyData access routines may be used to access the instance.
    RETURNS
      error code. Returns OCI_NO_DATA if the current position is at the end of
      the set, OCI_SUCCESS otherwise.
    PARAMETERS
      svchp (IN/OUT)      - OCI Service Context
      errhp (IN/OUT)      - OCI Error handle
      data_set (IN)       - Well formed OCIAnyDataSet
      data (IN/OUT)       - OCIAnyData corresponding to the instance. If (*data)
                            is NULL, a new OCIAnyData will be allocated for same
                            duration as the OCIAnyDataSet. If (*data) is not NULL
                            , it will get reused. This OCIAnyData can be
                            subsequently accessed using the OCIAnyDataAccess()
                            call or piece-wise by using the OCIAnyDataAttrGet()
                            call.
    NOTE
      No Destruction of the old value is done here. It is the responsibility of
      the caller to destroy the old value pointed to by (*data) and set (*data)
      to a null pointer before beginning to make a sequence of this call. No deep
      copying (of OCIType information nor the data part.) is done in the returned
      OCIAnyData. This OCIAnyData cannot be used beyond the allocation duration
      of the OCIAnyDataSet (it is like a reference into the OCIAnyDataSet). The
      returned OCIAnyData can be reused on subsequent calls to this function to
      sequentially access the OCIAnyDataSet.
   }
{$IFNDEF LinkDynamically}
  function OCIAnyDataSetGetInstance(svchp:POCISvcCtx; errhp:POCIError; data_set:POCIAnyDataSet; var data:POCIAnyData):sword;cdecl;external ocilib name 'OCIAnyDataSetGetInstance';
{$ELSE}
  OCIAnyDataSetGetInstance : function (svchp:POCISvcCtx; errhp:POCIError; data_set:POCIAnyDataSet; var data:POCIAnyData):sword;cdecl;
{$ENDIF}

  {--------------------- End of OCIAnyDataSet interfaces --------------------- }
{$IFNDEF LinkDynamically}
  function OCIFormatInit(hndl:Pdvoid; err:POCIError):sword;cdecl;external ocilib name 'OCIFormatInit';

//  function OCIFormatString(hndl:Pdvoid; err:POCIError; buffer:POraText; bufferLength:sbig_ora; returnLength:Psbig_ora;
//             formatString:POraText; args:array of const):sword;cdecl;external ocilib name 'OCIFormatString';

  function OCIFormatString(hndl:Pdvoid; err:POCIError; buffer:POraText; bufferLength:sbig_ora; returnLength:Psbig_ora; 
             formatString:POraText):sword;cdecl;external ocilib name 'OCIFormatString';

  function OCIFormatTerm(hndl:Pdvoid; err:POCIError):sword;cdecl;external ocilib name 'OCIFormatTerm';

  function OCIFormatTUb1:sword;cdecl;external ocilib name 'OCIFormatTUb1';

  function OCIFormatTUb2:sword;cdecl;external ocilib name 'OCIFormatTUb2';

  function OCIFormatTUb4:sword;cdecl;external ocilib name 'OCIFormatTUb4';

  function OCIFormatTUword:sword;cdecl;external ocilib name 'OCIFormatTUword';

  function OCIFormatTUbig_ora:sword;cdecl;external ocilib name 'OCIFormatTUbig_ora';

  function OCIFormatTSb1:sword;cdecl;external ocilib name 'OCIFormatTSb1';

  function OCIFormatTSb2:sword;cdecl;external ocilib name 'OCIFormatTSb2';

  function OCIFormatTSb4:sword;cdecl;external ocilib name 'OCIFormatTSb4';

  function OCIFormatTSword:sword;cdecl;external ocilib name 'OCIFormatTSword';

  function OCIFormatTSbig_ora:sword;cdecl;external ocilib name 'OCIFormatTSbig_ora';

  function OCIFormatTEb1:sword;cdecl;external ocilib name 'OCIFormatTEb1';

  function OCIFormatTEb2:sword;cdecl;external ocilib name 'OCIFormatTEb2';

  function OCIFormatTEb4:sword;cdecl;external ocilib name 'OCIFormatTEb4';

  function OCIFormatTEword:sword;cdecl;external ocilib name 'OCIFormatTEword';

  function OCIFormatTChar:sword;cdecl;external ocilib name 'OCIFormatTChar';

  function OCIFormatTText:sword;cdecl;external ocilib name 'OCIFormatTText';

  function OCIFormatTDouble:sword;cdecl;external ocilib name 'OCIFormatTDouble';

  function OCIFormatTDvoid:sword;cdecl;external ocilib name 'OCIFormatTDvoid';

  function OCIFormatTEnd:sword;cdecl;external ocilib name 'OCIFormatTEnd';

{$ELSE}
  OCIFormatInit : function (hndl:Pdvoid; err:POCIError):sword;cdecl;
//  function OCIFormatString(hndl:Pdvoid; err:POCIError; buffer:POraText; bufferLength:sbig_ora; returnLength:Psbig_ora;
//             formatString:POraText; args:array of const):sword;cdecl;external ocilib name 'OCIFormatString';

  OCIFormatString : function (hndl:Pdvoid; err:POCIError; buffer:POraText; bufferLength:sbig_ora; returnLength:Psbig_ora;
             formatString:POraText):sword;cdecl;

  OCIFormatTerm : function (hndl:Pdvoid; err:POCIError):sword;cdecl;

   OCIFormatTUb1: function : sword;cdecl;

   OCIFormatTUb2: function : sword;cdecl;

   OCIFormatTUb4: function :sword;cdecl;

   OCIFormatTUword: function :sword;cdecl;

   OCIFormatTUbig_ora: function :sword;cdecl;

   OCIFormatTSb1: function :sword;cdecl;

   OCIFormatTSb2: function :sword;cdecl;

   OCIFormatTSb4: function :sword;cdecl;

   OCIFormatTSword: function :sword;cdecl;

   OCIFormatTSbig_ora: function :sword;cdecl;

   OCIFormatTEb1: function :sword;cdecl;

   OCIFormatTEb2: function :sword;cdecl;

   OCIFormatTEb4: function :sword;cdecl;

   OCIFormatTEword: function :sword;cdecl;

   OCIFormatTChar: function :sword;cdecl;

   OCIFormatTText: function :sword;cdecl;

   OCIFormatTDouble: function :sword;cdecl;

   OCIFormatTDvoid: function :sword;cdecl;

   OCIFormatTEnd: function :sword;cdecl;

{$ENDIF}


  {-------------------------- Extensions to XA interface --------------------- }
  { ------------------------- xaosvch ---------------------------------------- }
  {
     NAME
       xaosvch  -  XA Oracle get SerViCe Handle
     DESCRIPTION
       Given a database name return the service handle that is used by the
       XA library
     NOTE
       This macro has been provided for backward compatibilty with 8.0.2
   }
{$IFNDEF LinkDynamically}
  function xaosvch(dbname:POraText):POCISvcCtx;cdecl;external ocilib name 'xaosvch';
{$ELSE}
  xaosvch : function (dbname:POraText):POCISvcCtx;cdecl;
{$ENDIF}

  { ------------------------- xaoSvcCtx -------------------------------------- }
  {
     NAME
       xaoSvcCtx  -  XA Oracle get SerViCe ConTeXt
     DESCRIPTION
       Given a database name return the service handle that is used by the
       XA library
     NOTE
       This routine has been provided for APs to get access to the service
       handle that XA library uses. Without this routine APs must use SQLLIB
       routine sqlld2 to get access to the Logon data area registered by the
       XA library
   }
{$IFNDEF LinkDynamically}
  function xaoSvcCtx(dbname:POraText):POCISvcCtx;cdecl;external ocilib name 'xaoSvcCtx';
{$ELSE}
  xaoSvcCtx : function (dbname:POraText):POCISvcCtx;cdecl;
{$ENDIF}

  { ------------------------- xaoEnv ----------------------------------------- }
  {
     NAME
       xaoEnv  -  XA Oracle get ENvironment Handle
     DESCRIPTION
       Given a database name return the environment handle that is used by the
       XA library
     NOTE
       This routine has been provided for APs to get access to the environment
       handle that XA library uses. Without this routine APs must use SQLLIB
       routine sqlld2 to get access to the Logon data area registered by the
       XA library
   }
{$IFNDEF LinkDynamically}
  function xaoEnv(dbname:POraText):POCIEnv;cdecl;external ocilib name 'xaoEnv';
{$ELSE}
  xaoEnv : function (dbname:POraText):POCIEnv;cdecl;
{$ENDIF}

  { ------------------------- xaosterr --------------------------------------- }
  {
     NAME
       xaosterr  -  XA Oracle get xa STart ERRor code
     DESCRIPTION
       Given an oracle error code return the XA error code
    }
{$IFNDEF LinkDynamically}
  function xaosterr(svch:POCISvcCtx; error:sb4):longint;cdecl;external ocilib name 'xaosterr';
{$ELSE}
  xaosterr : function (svch:POCISvcCtx; error:sb4):longint;cdecl;
{$ENDIF}

  {-------------------------- End Extensions --------------------------------- }
  {---------------------- Extensions to NLS cartridge service ---------------- }
  { ----------------------- OCINlsGetInfo ------------------------------------ }
  {
     NAME
       OCINlsGetInfo - Get NLS info from OCI environment handle
     REMARKS
       This function generates language information specified by item from OCI 
       environment handle envhp into an array pointed to by buf within size 
       limitation as buflen.
     RETURNS
       OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR on wrong item.
     envhp(IN/OUT)
       OCI environment handle.
     errhp(IN/OUT)
       The OCI error handle. If there is an error, it is record in errhp and 
       this function returns a NULL pointer. Diagnostic information can be 
       obtained by calling OCIErrorGet().
     buf(OUT)
       Pointer to the destination buffer.
     buflen(IN)
       The size of destination buffer. The maximum length for each information
       is 32 bytes.
     item(IN)
       It specifies to get which item in OCI environment handle and can be one
       of following values:
         OCI_NLS_DAYNAME1 : Native name for Monday.
         OCI_NLS_DAYNAME2 : Native name for Tuesday.
         OCI_NLS_DAYNAME3 : Native name for Wednesday.
         OCI_NLS_DAYNAME4 : Native name for Thursday.
         OCI_NLS_DAYNAME5 : Native name for Friday.
         OCI_NLS_DAYNAME6 : Native name for for Saturday.
         OCI_NLS_DAYNAME7 : Native name for for Sunday.
         OCI_NLS_ABDAYNAME1 : Native abbreviated name for Monday.
         OCI_NLS_ABDAYNAME2 : Native abbreviated name for Tuesday.
         OCI_NLS_ABDAYNAME3 : Native abbreviated name for Wednesday.
         OCI_NLS_ABDAYNAME4 : Native abbreviated name for Thursday.
         OCI_NLS_ABDAYNAME5 : Native abbreviated name for Friday.
         OCI_NLS_ABDAYNAME6 : Native abbreviated name for for Saturday.
         OCI_NLS_ABDAYNAME7 : Native abbreviated name for for Sunday.
         OCI_NLS_MONTHNAME1 : Native name for January.
         OCI_NLS_MONTHNAME2 : Native name for February.
         OCI_NLS_MONTHNAME3 : Native name for March.
         OCI_NLS_MONTHNAME4 : Native name for April.
         OCI_NLS_MONTHNAME5 : Native name for May.
         OCI_NLS_MONTHNAME6 : Native name for June.
         OCI_NLS_MONTHNAME7 : Native name for July.
         OCI_NLS_MONTHNAME8 : Native name for August.
         OCI_NLS_MONTHNAME9 : Native name for September.
         OCI_NLS_MONTHNAME10 : Native name for October.
         OCI_NLS_MONTHNAME11 : Native name for November.
         OCI_NLS_MONTHNAME12 : Native name for December.
         OCI_NLS_ABMONTHNAME1 : Native abbreviated name for January.
         OCI_NLS_ABMONTHNAME2 : Native abbreviated name for February.
         OCI_NLS_ABMONTHNAME3 : Native abbreviated name for March.
         OCI_NLS_ABMONTHNAME4 : Native abbreviated name for April.
         OCI_NLS_ABMONTHNAME5 : Native abbreviated name for May.
         OCI_NLS_ABMONTHNAME6 : Native abbreviated name for June.
         OCI_NLS_ABMONTHNAME7 : Native abbreviated name for July.
         OCI_NLS_ABMONTHNAME8 : Native abbreviated name for August.
         OCI_NLS_ABMONTHNAME9 : Native abbreviated name for September.
         OCI_NLS_ABMONTHNAME10 : Native abbreviated name for October.
         OCI_NLS_ABMONTHNAME11 : Native abbreviated name for November.
         OCI_NLS_ABMONTHNAME12 : Native abbreviated name for December.
         OCI_NLS_YES : Native string for affirmative response.
         OCI_NLS_NO : Native negative response. 
         OCI_NLS_AM : Native equivalent string of AM.
         OCI_NLS_PM : Native equivalent string of PM.
         OCI_NLS_AD : Native equivalent string of AD.
         OCI_NLS_BC : Native equivalent string of BC.
         OCI_NLS_DECIMAL : decimal character.
         OCI_NLS_GROUP : group separator.
         OCI_NLS_DEBIT : Native symbol of debit.
         OCI_NLS_CREDIT : Native sumbol of credit.
         OCI_NLS_DATEFORMAT : Oracle date format.
         OCI_NLS_INT_CURRENCY: International currency symbol.
         OCI_NLS_LOC_CURRENCY : Locale currency symbol.
         OCI_NLS_LANGUAGE : Language name.
         OCI_NLS_ABLANGUAGE : Abbreviation for language name.
         OCI_NLS_TERRITORY : Territory name.
         OCI_NLS_CHARACTER_SET : Character set name.
         OCI_NLS_LINGUISTIC : Linguistic name.
         OCI_NLS_CALENDAR : Calendar name.
         OCI_NLS_DUAL_CURRENCY : Dual currency symbol.
   }
{$IFNDEF LinkDynamically}
  function OCINlsGetInfo(envhp:Pdvoid; errhp:POCIError; buf:POraText; buflen:size_t; item:ub2):sword;cdecl;external ocilib name 'OCINlsGetInfo';
{$ELSE}
  OCINlsGetInfo : function (envhp:Pdvoid; errhp:POCIError; buf:POraText; buflen:size_t; item:ub2):sword;cdecl;
{$ENDIF}

  { ----------------------- OCINlsNumericInfoGet ----------------------------- }
  {
     NAME
       OCINlsNumericInfoGet - Get NLS numeric info from OCI environment handle
     REMARKS
       This function generates numeric language information specified by item 
       from OCI environment handle envhp into an output number variable.
     RETURNS
       OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR on wrong item.
     envhp(IN/OUT)
       OCI environment handle. If handle invalid, returns OCI_INVALID_HANDLE.
     errhp(IN/OUT)
       The OCI error handle. If there is an error, it is record in errhp and 
       this function returns a NULL pointer. Diagnostic information can be 
       obtained by calling OCIErrorGet().
     val(OUT)
       Pointer to the output number variable. On OCI_SUCCESS return, it will
       contain the requested NLS numeric info.
     item(IN)
       It specifies to get which item in OCI environment handle and can be one
       of following values:
         OCI_NLS_CHARSET_MAXBYTESZ : Maximum character byte size for OCI
                                     environment or session handle charset
         OCI_NLS_CHARSET_FIXEDWIDTH: Character byte size for fixed-width charset;
                                     0 for variable-width charset 
   }
{$IFNDEF LinkDynamically}
  function OCINlsNumericInfoGet(envhp:Pdvoid; errhp:POCIError; val:Psb4; item:ub2):sword;cdecl;external ocilib name 'OCINlsNumericInfoGet';
{$ELSE}
  OCINlsNumericInfoGet : function (envhp:Pdvoid; errhp:POCIError; val:Psb4; item:ub2):sword;cdecl;
{$ENDIF}

  { ----------------------- OCINlsCharSetNameToId ---------------------------- }
  {
     NAME
       OCINlsCharSetNameToId - Get Oracle charset id given Oracle charset name
     REMARKS
       This function will get the Oracle character set id corresponding to
       the given Oracle character set name.
     RETURNS
       Oracle character set id for the given Oracle character set name if
       character set name and OCI handle are valid; otherwise returns 0.
     envhp(IN/OUT)
       OCI environment handle.
     name(IN)
       Pointer to a null-terminated Oracle character set name whose id 
       will be returned.
   }
{$IFNDEF LinkDynamically}
  function OCINlsCharSetNameToId(envhp:Pdvoid; name:Poratext):ub2;cdecl;external ocilib name 'OCINlsCharSetNameToId';
{$ELSE}
  OCINlsCharSetNameToId : function (envhp:Pdvoid; name:Poratext):ub2;cdecl;
{$ENDIF}

  { ----------------------- OCINlsCharSetIdToName ---------------------------- }
  {
     NAME
       OCINlsCharSetIdToName - Get Oracle charset name given Oracle charset id
     REMARKS
       This function will get the Oracle character set name corresponding to
       the given Oracle character set id.
     RETURNS
       OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
     envhp(IN/OUT)
       OCI environment handle. If handle invalid, returns OCI_INVALID_HANDLE.
     buf(OUT)
       Pointer to the destination buffer. On OCI_SUCCESS return, it will contain
       the null-terminated string for character set name.
     buflen(IN)
       Size of destination buffer. Recommended size is OCI_NLS_MAXBUFSZ for
       guarantee to store an Oracle character set name. If it's smaller than
       the length of the character set name, the function will return OCI_ERROR.
     id(IN)
       Oracle character set id.
   }
{$IFNDEF LinkDynamically}
  function OCINlsCharSetIdToName(envhp:Pdvoid; buf:Poratext; buflen:size_t; id:ub2):sword;cdecl;external ocilib name 'OCINlsCharSetIdToName';
{$ELSE}
  OCINlsCharSetIdToName : function (envhp:Pdvoid; buf:Poratext; buflen:size_t; id:ub2):sword;cdecl;
{$ENDIF}

  { ----------------------- OCINlsNameMap ------------------------------------ }
  {
     NAME
       OCINlsNameMap - Map NLS naming from Oracle to other standards and vice 
                       versa
     REMARKS
       This function will map NLS naming from Oracle to other standards (such
       as ISO, IANA) and vice versa.
     RETURNS
       OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
     envhp(IN/OUT)
       OCI environment handle. If handle invalid, returns OCI_INVALID_HANDLE.
     buf(OUT)
       Pointer to the destination buffer. On OCI_SUCCESS return, it will 
       contain null-terminated string for requested mapped name.
     buflen(IN)
       The size of destination buffer. Recommended size is OCI_NLS_MAXBUFSZ
       for guarantee to store an NLS name. If it is smaller than the length
       of the name, the function will return OCI_ERROR.
     srcbuf(IN)
       Pointer to null-terminated NLS name. If it is not a valid name in its
       define scope, the function will return OCI_ERROR.
     flag(IN)
       It specifies name mapping direction and can take the following values:
         OCI_NLS_CS_IANA_TO_ORA : Map character set name from IANA to Oracle
         OCI_NLS_CS_ORA_TO_IANA : Map character set name from Oracle to IANA
         OCI_NLS_LANG_ISO_TO_ORA : Map language name from ISO to Oracle
         OCI_NLS_LANG_ORA_TO_ISO : Map language name from Oracle to ISO
         OCI_NLS_TERR_ISO_TO_ORA : Map territory name from ISO to Oracle
         OCI_NLS_TERR_ORA_TO_ISO : Map territory name from Oracle to ISO
         OCI_NLS_TERR_ISO3_TO_ORA : Map territory name from 3-letter ISO
                                    abbreviation to Oracle
         OCI_NLS_TERR_ORA_TO_ISO3 : Map territory name from Oracle to 3-letter
                                    ISO abbreviation
   }
{$IFNDEF LinkDynamically}
  function OCINlsNameMap(envhp:Pdvoid; buf:Poratext; buflen:size_t; srcbuf:Poratext; flag:ub4):sword;cdecl;external ocilib name 'OCINlsNameMap';
{$ELSE}
  OCINlsNameMap : function (envhp:Pdvoid; buf:Poratext; buflen:size_t; srcbuf:Poratext; flag:ub4):sword;cdecl;
{$ENDIF}

  { -------------------- OCIMultiByteToWideChar ------------------------------ }
  {
     NAME
       OCIMultiByteToWideChar - Convert a null terminated multibyte string into 
                                wchar
     REMARKS
       This routine converts an entire null-terminated string into the wchar 
       format. The wchar output buffer will be null-terminated.
     RETURNS
       OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
     envhp(IN/OUT)
       OCI environment handle to determine the character set of string.
     dst (OUT)
       Destination buffer for wchar.
     src (IN)
       Source string to be converted.
     rsize (OUT)
       Number of characters converted including null-terminator.
       If it is a NULL pointer, no number return
   }
{$IFNDEF LinkDynamically}
  function OCIMultiByteToWideChar(envhp:Pdvoid; dst:POCIWchar; src:POraText; rsize:Psize_t):sword;cdecl;external ocilib name 'OCIMultiByteToWideChar';
{$ELSE}
  OCIMultiByteToWideChar : function (envhp:Pdvoid; dst:POCIWchar; src:POraText; rsize:Psize_t):sword;cdecl;
{$ENDIF}

  { --------------------- OCIMultiByteInSizeToWideChar ----------------------- }
  {
     NAME
       OCIMultiByteInSizeToWideChar - Convert a mulitbyte string in length into
                                      wchar
     REMARKS
       This routine converts part of string into the wchar format. It will
       convert as many complete characters as it can until it reaches output
       buffer size or input buffer size or it reaches a null-terminator in
       source string. The output buffer will be null-terminated if space permits.
       If dstsz is zero, this function will only return number of characters not
       including ending null terminator for converted string.
     RETURNS
       OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
     envhp(IN/OUT)
       OCI environment handle to determine the character set of string.
     dst (OUT)
       Pointer to a destination buffer for wchar. It can be NULL pointer when
       dstsz is zero.
     dstsz(IN)
       Destination buffer size in character. If it is zero, this function just
       returns number of characters will be need for the conversion.
     src (IN)
       Source string to be converted.
     srcsz(IN)
       Length of source string in byte.
     rsize(OUT)
       Number of characters written into destination buffer, or number of
       characters for converted string is dstsz is zero.
       If it is NULL pointer, nothing to return.
   }
{$IFNDEF LinkDynamically}
  function OCIMultiByteInSizeToWideChar(envhp:Pdvoid; dst:POCIWchar; dstsz:size_t; src:POraText; srcsz:size_t;
             rsize:Psize_t):sword;cdecl;external ocilib name 'OCIMultiByteInSizeToWideChar';
{$ELSE}
  OCIMultiByteInSizeToWideChar : function (envhp:Pdvoid; dst:POCIWchar; dstsz:size_t; src:POraText; srcsz:size_t;
             rsize:Psize_t):sword;cdecl;
{$ENDIF}

  { ---------------------- OCIWideCharToMultiByte ---------------------------- }
  {
     NAME
       OCIWideCharToMultiByte - Convert a null terminated wchar string into
                                multibyte
     REMARKS
       This routine converts an entire null-terminated wide character string into
       multi-byte string. The output buffer will be null-terminated.
     RETURNS
       OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
     envhp(IN/OUT)
       OCI environment handle to determine the character set of string.
     dst (OUT)
       Destination buffer for multi-byte string.
     src (IN)
       Source wchar string to be converted.
     rsize (OUT)
       Number of bytes written into the destination buffer.
       If it is NULL pointer, nothing to return.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharToMultiByte(envhp:Pdvoid; dst:POraText; src:POCIWchar; rsize:Psize_t):sword;cdecl;external ocilib name 'OCIWideCharToMultiByte';
{$ELSE}
  OCIWideCharToMultiByte : function (envhp:Pdvoid; dst:POraText; src:POCIWchar; rsize:Psize_t):sword;cdecl;
{$ENDIF}

  { ---------------------- OCIWideCharInSizeToMultiByte ---------------------- }
  {
     NAME
       OCIWideCharInSizeToMultiByte - Convert a wchar string in length into 
                                      mulitbyte
     REMARKS
       This routine converts part of wchar string into the multi-byte format.
       It will convert as many complete characters as it can until it reaches
       output buffer size or input buffer size or it reaches a null-terminator
       in source string. The output buffer will be null-terminated if space
       permits. If dstsz is zero, the function just returns the size of byte not 
       including ending null-terminator need to store the converted string.
     RETURNS
       OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
     envhp(IN/OUT)
       OCI environment handle to determine the character set of string.
     dst (OUT)
       Destination buffer for multi-byte. It can be NULL pointer if dstsz is
       zero.
     dstsz(IN)
       Destination buffer size in byte. If it is zero, it just returns the size
       of bytes need for converted string.
     src (IN)
       Source wchar string to be converted.
     srcsz(IN)
       Length of source string in character.
     rsize(OUT)
       Number of bytes written into destination buffer, or number of bytes need
       to store the converted string if dstsz is zero.
       If it is NULL pointer, nothing to return.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharInSizeToMultiByte(envhp:Pdvoid; dst:POraText; dstsz:size_t; src:POCIWchar; srcsz:size_t;
             rsize:Psize_t):sword;cdecl;external ocilib name 'OCIWideCharInSizeToMultiByte';
{$ELSE}
  OCIWideCharInSizeToMultiByte : function (envhp:Pdvoid; dst:POraText; dstsz:size_t; src:POCIWchar; srcsz:size_t;
             rsize:Psize_t):sword;cdecl;
{$ENDIF}

  { ----------------------- OCIWideCharIsAlnum ------------------------------- }
  {
     NAME
       OCIWideCharIsAlnum - test whether wc is a letter or decimal digit
     REMARKS
       It tests whether wc is a letter or decimal digit.
     RETURNS
       TRUE or FLASE.
     envhp(IN/OUT)
       OCI environment handle to determine the character set .
     wc(IN)
       Wchar for testing.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharIsAlnum(envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;external ocilib name 'OCIWideCharIsAlnum';
{$ELSE}
  OCIWideCharIsAlnum : function (envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;
{$ENDIF}

  { ----------------------- OCIWideCharIsAlpha ------------------------------- }
  {
     NAME
       OCIWideCharIsAlpha - test whether wc is an alphabetic letter
     REMARKS
       It tests whether wc is an alphabetic letter
     RETURNS
       TRUE or FLASE.
     envhp(IN/OUT)
       OCI environment handle to determine the character set .
     wc(IN)
       Wchar for testing.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharIsAlpha(envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;external ocilib name 'OCIWideCharIsAlpha';
{$ELSE}
  OCIWideCharIsAlpha : function (envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;
{$ENDIF}

  { --------------------- OCIWideCharIsCntrl --------------------------------- }
  {
     NAME
       OCIWideCharIsCntrl - test whether wc is a control character
     REMARKS
       It tests whether wc is a control character.
     RETURNS
       TRUE or FLASE.
     envhp(IN/OUT)
       OCI environment handle to determine the character set .
     wc(IN)
       Wchar for testing.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharIsCntrl(envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;external ocilib name 'OCIWideCharIsCntrl';
{$ELSE}
  OCIWideCharIsCntrl : function (envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;
{$ENDIF}

  { ----------------------- OCIWideCharIsDigit ------------------------------- }
  {
     NAME
       OCIWideCharIsDigit - test whether wc is a decimal digit character
     REMARKS
       It tests whether wc is a decimal digit character.
     RETURNS
       TRUE or FLASE.
     envhp(IN/OUT)
       OCI environment handle to determine the character set .
     wc(IN)
       Wchar for testing.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharIsDigit(envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;external ocilib name 'OCIWideCharIsDigit';
{$ELSE}
  OCIWideCharIsDigit : function (envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;
{$ENDIF}

  { ----------------------- OCIWideCharIsGraph ------------------------------- }
  {
     NAME
       OCIWideCharIsGraph - test whether wc is a graph character
     REMARKS
       It tests whether wc is a graph character. A graph character is character
       with a visible representation and normally includes alphabetic letter,
       decimal digit, and punctuation.
     RETURNS
       TRUE or FLASE.
     envhp(IN/OUT)
       OCI environment handle to determine the character set .
     wc(IN)
       Wchar for testing.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharIsGraph(envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;external ocilib name 'OCIWideCharIsGraph';
{$ELSE}
  OCIWideCharIsGraph : function (envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;
{$ENDIF}

  { ----------------------- OCIWideCharIsLower ------------------------------- }
  {
     NAME
       OCIWideCharIsLower - test whether wc is a lowercase letter
     REMARKS
       It tests whether wc is a lowercase letter.
     RETURNS
       TRUE or FLASE.
     envhp(IN/OUT)
       OCI environment handle to determine the character set .
     wc(IN)
       Wchar for testing.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharIsLower(envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;external ocilib name 'OCIWideCharIsLower';
{$ELSE}
  OCIWideCharIsLower : function (envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;
{$ENDIF}

  { ----------------------- OCIWideCharIsPrint ------------------------------- }
  {
     NAME
       OCIWideCharIsPrint - test whether wc is a printable character
     REMARKS
       It tests whether wc is a printable character.
     RETURNS
       TRUE or FLASE.
     envhp(IN/OUT)
       OCI environment handle to determine the character set .
     wc(IN)
       Wchar for testing.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharIsPrint(envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;external ocilib name 'OCIWideCharIsPrint';
{$ELSE}
  OCIWideCharIsPrint : function (envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;
{$ENDIF}

  { ----------------------- OCIWideCharIsPunct ------------------------------- }
  {
     NAME
       OCIWideCharIsPunct - test whether wc is a punctuation character
     REMARKS
       It tests whether wc is a punctuation character.
     RETURNS
       TRUE or FLASE.
     envhp(IN/OUT)
       OCI environment handle to determine the character set .
     wc(IN)
       Wchar for testing.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharIsPunct(envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;external ocilib name 'OCIWideCharIsPunct';
{$ELSE}
  OCIWideCharIsPunct : function (envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;
{$ENDIF}

  { ----------------------- OCIWideCharIsSpace ------------------------------- }
  {
     NAME
       OCIWideCharIsSpace - test whether wc is a space character
     REMARKS
       It tests whether wc is a space character. A space character only causes
       white space in displayed text(for example, space, tab, carriage return,
       newline, vertical tab or form feed).
     RETURNS
       TRUE or FLASE.
     envhp(IN/OUT)
       OCI environment handle to determine the character set .
     wc(IN)
       Wchar for testing.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharIsSpace(envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;external ocilib name 'OCIWideCharIsSpace';
{$ELSE}
  OCIWideCharIsSpace : function (envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;
{$ENDIF}

  { ----------------------- OCIWideCharIsUpper ------------------------------- }
  {
     NAME
       OCIWideCharIsUpper - test whether wc is a uppercase letter
     REMARKS
       It tests whether wc is a uppercase letter.
     RETURNS
       TRUE or FLASE.
     envhp(IN/OUT)
       OCI environment handle to determine the character set .
     wc(IN)
       Wchar for testing.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharIsUpper(envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;external ocilib name 'OCIWideCharIsUpper';
{$ELSE}
  OCIWideCharIsUpper : function (envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;
{$ENDIF}

  {----------------------- OCIWideCharIsXdigit ------------------------------- }
  {
     NAME
       OCIWideCharIsXdigit - test whether wc is a hexadecimal digit
     REMARKS
       It tests whether wc is a hexadecimal digit ( 0-9, A-F, a-f ).
     RETURNS
       TRUE or FLASE.
     envhp(IN/OUT)
       OCI environment handle to determine the character set .
     wc(IN)
       Wchar for testing.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharIsXdigit(envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;external ocilib name 'OCIWideCharIsXdigit';
{$ELSE}
  OCIWideCharIsXdigit : function (envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;
{$ENDIF}

  { --------------------- OCIWideCharIsSingleByte ---------------------------- }
  {
     NAME
       OCIWideCharIsSingleByte - test whether wc is a single-byte character
     REMARKS
       It tests whether wc is a single-byte character when converted into
       multi-byte.
     RETURNS
       TRUE or FLASE.
     envhp(IN/OUT)
       OCI environment handle to determine the character set .
     wc(IN)
       Wchar for testing.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharIsSingleByte(envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;external ocilib name 'OCIWideCharIsSingleByte';
{$ELSE}
  OCIWideCharIsSingleByte : function (envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;
{$ENDIF}

  { ----------------------- OCIWideCharToLower ------------------------------- }
  {
     NAME
       OCIWideCharToLower - Convert a wchar into the lowercase
     REMARKS
       If there is a lower-case character mapping for wc in the specified locale,
       it will return the lower-case in wchar, else return wc itself.
     RETURNS
       A wchar
     envhp(IN/OUT)
       OCI environment handle to determine the character set .
     wc(IN)
       Wchar for lowercase mapping.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharToLower(envhp:Pdvoid; wc:OCIWchar):OCIWchar;cdecl;external ocilib name 'OCIWideCharToLower';
{$ELSE}
  OCIWideCharToLower : function (envhp:Pdvoid; wc:OCIWchar):OCIWchar;cdecl;
{$ENDIF}

  { ----------------------- OCIWideCharToUpper ------------------------------- }
  {
     NAME
       OCIWideCharToUpper - Convert a wchar into the uppercase
     REMARKS
       If there is a upper-case character mapping for wc in the specified locale,
       it will return the upper-case in wchar, else return wc itself.
     RETURNS
       A wchar
     envhp(IN/OUT)
       OCI environment handle to determine the character set .
     wc(IN)
       Wchar for uppercase mapping.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharToUpper(envhp:Pdvoid; wc:OCIWchar):OCIWchar;cdecl;external ocilib name 'OCIWideCharToUpper';
{$ELSE}
  OCIWideCharToUpper : function (envhp:Pdvoid; wc:OCIWchar):OCIWchar;cdecl;
{$ENDIF}

  { ----------------------- OCIWideCharStrcmp -------------------------------- }
  {
     NAME
       OCIWideCharStrcmp - compare two null terminated wchar string
     REMARKS
       It compares two wchar string in binary ( based on wchar encoding value ),
       linguistic, or case-insensitive.
     RETURNS
       0, if wstr1 == wstr2.
       Positive, if wstr1 > wstr2.
       Negative, if wstr1 < wstr2.
     envhp(IN/OUT)
       OCI environment handle to determine the character set.
     wstr1(IN)
       Pointer to a null-terminated wchar string.
     wstr2(IN)
       Pointer to a null-terminated wchar string.
     flag(IN)
       It is used to decide the comparison method. It can be taken one of the
       following values:
         OCI_NLS_BINARY : for the binary comparison, this is default value.
         OCI_NLS_LINGUISTIC : for linguistic comparison specified in the locale.
       This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive
       comparison.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharStrcmp(envhp:Pdvoid; wstr1:POCIWchar; wstr2:POCIWchar; flag:longint):longint;cdecl;external ocilib name 'OCIWideCharStrcmp';
{$ELSE}
  OCIWideCharStrcmp : function (envhp:Pdvoid; wstr1:POCIWchar; wstr2:POCIWchar; flag:longint):longint;cdecl;
{$ENDIF}

  { ----------------------- OCIWideCharStrncmp ------------------------------- }
  {
     NAME
       OCIWideCharStrncmp - compare twe wchar string in length
     REMARKS
       This function is similar to OCIWideCharStrcmp(), except that at most len1
       characters from wstr1 and len2 characters from wstr1 are compared. The
       null-terminator will be taken into the comparison.
     RETURNS
       0, if wstr1 = wstr2
       Positive, if wstr1 > wstr2
       Negative, if wstr1 < wstr2
     envhp(IN/OUT)
       OCI environment handle to determine the character set .
     wstr1(IN)
       Pointer to the first wchar string
     len1(IN)
       The length for the first string for comparison
     wstr2(IN)
       Pointer to the second wchar string
     len2(IN)
       The length for the second string for comparison.
     flag(IN)
       It is used to decide the comparison method. It can be taken one of the
       following values:
         OCI_NLS_BINARY : for the binary comparison, this is default value.
         OCI_NLS_LINGUISTIC : for linguistic comparison specified in the locale.
       This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive 
       comparison.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharStrncmp(envhp:Pdvoid; wstr1:POCIWchar; len1:size_t; wstr2:POCIWchar; len2:size_t;
             flag:longint):longint;cdecl;external ocilib name 'OCIWideCharStrncmp';
{$ELSE}
  OCIWideCharStrncmp : function (envhp:Pdvoid; wstr1:POCIWchar; len1:size_t; wstr2:POCIWchar; len2:size_t;
             flag:longint):longint;cdecl;
{$ENDIF}

  { ----------------------- OCIWideCharStrcat -------------------------------- }
  {
     NAME
       OCIWideCharStrcat - concatenate two wchar strings
     REMARKS
       This function appends a copy of the wchar string pointed to by wsrcstr,
       including the null-terminator to the end of wchar string pointed to by
       wdststr. It returns the number of character in the result string not
       including the ending null-terminator.
     RETURNS
       number of characters in the result string not including the ending
       null-terminator.
     envhp(IN/OUT)
       OCI environment handle to determine the character set .
     wdststr(IN/OUT)
       Pointer to the destination wchar string for appending.
     wsrcstr(IN)
       Pointer to the source wchar string to append.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharStrcat(envhp:Pdvoid; wdststr:POCIWchar; wsrcstr:POCIWchar):size_t;cdecl;external ocilib name 'OCIWideCharStrcat';
{$ELSE}
  OCIWideCharStrcat : function (envhp:Pdvoid; wdststr:POCIWchar; wsrcstr:POCIWchar):size_t;cdecl;
{$ENDIF}

  { ----------------------- OCIWideCharStrchr -------------------------------- }
  {
     NAME
       OCIWideCharStrchr - Search the first occurrence of wchar in a wchar string
     REMARKS
       This function searchs for the first occurrence of wc in the wchar string
       pointed to by wstr. It returns a pointer to the whcar if successful, or
       a null pointer.
     RETURNS
       wchar pointer if successful, otherwise a null pointer.
     envhp(IN/OUT)
       OCI environment handle to determine the character set .
     wstr(IN)
       Pointer to the wchar string to search
     wc(IN)
       Wchar to search for.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharStrchr(envhp:Pdvoid; wstr:POCIWchar; wc:OCIWchar):POCIWchar;cdecl;external ocilib name 'OCIWideCharStrchr';
{$ELSE}
  OCIWideCharStrchr : function (envhp:Pdvoid; wstr:POCIWchar; wc:OCIWchar):POCIWchar;cdecl;
{$ENDIF}

  { ----------------------- OCIWideCharStrcpy -------------------------------- }
  {
     NAME
       OCIWideCharStrcpy - copy a wchar string
     REMARKS
       This function copies the wchar string pointed to by wsrcstr, including the
       null-terminator, into the array pointed to by wdststr. It returns the
       number of character copied not including the ending null-terminator.
     RETURNS
       number of characters copied not including the ending null-terminator.
     envhp(IN/OUT)
       OCI environment handle to determine the character set .
     wdststr(OUT)
       Pointer to the destination wchar buffer.
     wsrcstr(IN)
       Pointer to the source wchar string.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharStrcpy(envhp:Pdvoid; wdststr:POCIWchar; wsrcstr:POCIWchar):size_t;cdecl;external ocilib name 'OCIWideCharStrcpy';
{$ELSE}
  OCIWideCharStrcpy : function (envhp:Pdvoid; wdststr:POCIWchar; wsrcstr:POCIWchar):size_t;cdecl;
{$ENDIF}

  { ----------------------- OCIWideCharStrlen -------------------------------- }
  {
     NAME
       OCIWideCharStrlen - Return number of character in a wchar string
     REMARKS
       This function computes the number of characters in the wchar string
       pointed to by wstr, not including the null-terminator, and returns
      this number. 
     RETURNS
       number of characters not including ending null-terminator.
     envhp(IN/OUT)
       OCI environment handle to determine the character set .
     wstr(IN)
       Pointer to the source wchar string.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharStrlen(envhp:Pdvoid; wstr:POCIWchar):size_t;cdecl;external ocilib name 'OCIWideCharStrlen';
{$ELSE}
  OCIWideCharStrlen : function (envhp:Pdvoid; wstr:POCIWchar):size_t;cdecl;
{$ENDIF}

  { ----------------------- OCIWideCharStrncat ------------------------------- }
  {
     NAME
       OCIWideCharStrncat - Concatenate wchar string in length
     REMARKS
       This function is similar to OCIWideCharStrcat(), except that at most n
       characters from wsrcstr are appended to wdststr. Note that the
       null-terminator in wsrcstr will stop appending. wdststr will be
       null-terminated.. 
     RETURNS
       Number of characters in the result string not including the ending
       null-terminator.
     envhp(IN/OUT)
       OCI environment handle to determine the character set .
     wdststr(IN/OUT)
       Pointer to the destination wchar string for appending.
     wsrcstr(IN)
       Pointer to the source wchar string to append.
     n(IN)
       Number of characters from wsrcstr to append.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharStrncat(envhp:Pdvoid; wdststr:POCIWchar; wsrcstr:POCIWchar; n:size_t):size_t;cdecl;external ocilib name 'OCIWideCharStrncat';
{$ELSE}
  OCIWideCharStrncat : function (envhp:Pdvoid; wdststr:POCIWchar; wsrcstr:POCIWchar; n:size_t):size_t;cdecl;
{$ENDIF}

  { ----------------------- OCIWideCharStrncpy ------------------------------- }
  {
     NAME
       OCIWideCharStrncpy - Copy wchar string in length
     REMARKS
       This function is similar to OCIWideCharStrcpy(), except that at most n
       characters are copied from the array pointed to by wsrcstr to the array
       pointed to by wdststr. Note that the null-terminator in wdststr will
       stop coping and result string will be null-terminated.
     RETURNS
       number of characters copied not including the ending null-terminator.
     envhp(IN/OUT)
       OCI environment handle to determine the character set .
     wdststr(OUT)
       Pointer to the destination wchar buffer.
     wsrcstr(IN)
       Pointer to the source wchar string.
     n(IN)
       Number of characters from wsrcstr to copy.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharStrncpy(envhp:Pdvoid; wdststr:POCIWchar; wsrcstr:POCIWchar; n:size_t):size_t;cdecl;external ocilib name 'OCIWideCharStrncpy';
{$ELSE}
  OCIWideCharStrncpy : function (envhp:Pdvoid; wdststr:POCIWchar; wsrcstr:POCIWchar; n:size_t):size_t;cdecl;
{$ENDIF}

  { ----------------------- OCIWideCharStrrchr ------------------------------- }
  {
     NAME
       OCIWideCharStrrchr - search the last occurrence of a wchar in wchar string
     REMARKS
       This function searchs for the last occurrence of wc in the wchar string
       pointed to by wstr. It returns a pointer to the whcar if successful, or
       a null pointer.
     RETURNS
       wchar pointer if successful, otherwise a null pointer.
     envhp(IN/OUT)
       OCI environment handle to determine the character set .
     wstr(IN)
       Pointer to the wchar string to search
     wc(IN)
       Wchar to search for.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharStrrchr(envhp:Pdvoid; wstr:POCIWchar; wc:OCIWchar):POCIWchar;cdecl;external ocilib name 'OCIWideCharStrrchr';
{$ELSE}
  OCIWideCharStrrchr : function (envhp:Pdvoid; wstr:POCIWchar; wc:OCIWchar):POCIWchar;cdecl;
{$ENDIF}

  { --------------------- OCIWideCharStrCaseConversion ----------------------- }
  {
     NAME
       OCIWideCharStrCaseConversion - convert a wchar string into lowercase or
                                      uppercase
     REMARKS
       This function convert the wide char string pointed to by wsrcstr into the
       uppercase or lowercase specified by flag and copies the result into the
       array pointed to by wdststr. The result string will be null-terminated.
     RETURNS
       number of characters for result string not including null-terminator.
     envhp(IN/OUT)
       OCI environment handle.
     wdststr(OUT)
       Pointer to destination array.
     wsrcstr(IN)
       Pointer to source string.
     flag(IN)
       Specify the case to convert:
         OCI_NLS_UPPERCASE : convert to uppercase.
         OCI_NLS_LOWERCASE: convert to lowercase.
       This flag can be ORed with OCI_NLS_LINGUISTIC to specify that the
       linguistic setting in the locale will be used for case conversion.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharStrCaseConversion(envhp:Pdvoid; wdststr:POCIWchar; wsrcstr:POCIWchar; flag:ub4):size_t;cdecl;external ocilib name 'OCIWideCharStrCaseConversion';
{$ELSE}
  OCIWideCharStrCaseConversion : function (envhp:Pdvoid; wdststr:POCIWchar; wsrcstr:POCIWchar; flag:ub4):size_t;cdecl;
{$ENDIF}

  {---------------------- OCIWideCharDisplayLength --------------------------- }
  {
     NAME
       OCIWideCharDisplayLength - Calculate the display length for a wchar
     REMARKS
       This function determines the number of column positions required for wc
       in display. It returns number of column positions, or 0 if wc is 
       null-terminator.
     RETURNS
       Number of display positions.
     envhp(IN/OUT)
       OCI environment handle to determine the character set .
     wc(IN)
       Wchar character.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharDisplayLength(envhp:Pdvoid; wc:OCIWchar):size_t;cdecl;external ocilib name 'OCIWideCharDisplayLength';
{$ELSE}
  OCIWideCharDisplayLength : function (envhp:Pdvoid; wc:OCIWchar):size_t;cdecl;
{$ENDIF}

  {---------------------- OCIWideCharMultiByteLength ------------------------- }
  {
     NAME
       OCIWideCharMultiByteLength - Determine byte size in multi-byte encoding
     REMARKS
       This function determines the number of byte required for wc in multi-byte
       encoding. It returns number of bytes in multi-byte for wc.
     RETURNS
       Number of bytes.
     envhp(IN/OUT)
       OCI environment handle to determine the character set .
     wc(IN)
       Wchar character.
   }
{$IFNDEF LinkDynamically}
  function OCIWideCharMultiByteLength(envhp:Pdvoid; wc:OCIWchar):size_t;cdecl;external ocilib name 'OCIWideCharMultiByteLength';
{$ELSE}
  OCIWideCharMultiByteLength : function (envhp:Pdvoid; wc:OCIWchar):size_t;cdecl;
{$ENDIF}

  { ----------------------- OCIMultiByteStrcmp ------------------------------- }
  {
     NAME
       OCIMultiByteStrcmp - Compare two multi-byte strings
     REMARKS
       It compares two multi-byte strings in binary ( based on encoding value ),
       linguistic, or case-insensitive.
     RETURNS
       0, if str1 == str2.
       Positive, if str1 > str2.
       Negative, if str1 < str2.
     envhp(IN/OUT)
       OCI environment handle to determine the character set.
     str1(IN)
       Pointer to a null-terminated string.
     str2(IN)
       Pointer to a null-terminated string.
     flag(IN)
       It is used to decide the comparison method. It can be taken one of the
       following values:
         OCI_NLS_BINARY: for the binary comparison, this is default value.
         OCI_NLS_LINGUISTIC: for linguistic comparison specified in the locale.
       This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive 
       comparison.
   }
{$IFNDEF LinkDynamically}
  function OCIMultiByteStrcmp(envhp:Pdvoid; str1:POraText; str2:POraText; flag:longint):longint;cdecl;external ocilib name 'OCIMultiByteStrcmp';
{$ELSE}
  OCIMultiByteStrcmp : function (envhp:Pdvoid; str1:POraText; str2:POraText; flag:longint):longint;cdecl;
{$ENDIF}

  {----------------------- OCIMultiByteStrncmp ------------------------------- }
  {
     NAME
       OCIMultiByteStrncmp - compare two strings in length
     REMARKS
       This function is similar to OCIMultiBytestrcmp(), except that at most
       len1 bytes from str1 and len2 bytes from str2 are compared. The
       null-terminator will be taken into the comparison.
     RETURNS
       0, if str1 = str2
       Positive, if str1 > str2
       Negative, if str1 < str2
     envhp(IN/OUT)
       OCI environment handle to determine the character set.
     str1(IN)
       Pointer to the first string
     len1(IN)
       The length for the first string for comparison
     str2(IN)
       Pointer to the second string
     len2(IN)
       The length for the second string for comparison.
     flag(IN)
       It is used to decide the comparison method. It can be taken one of the
       following values:
         OCI_NLS_BINARY: for the binary comparison, this is default value.
         OCI_NLS_LINGUISTIC: for linguistic comparison specified in the locale.
       This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive 
       comparison.
   }
{$IFNDEF LinkDynamically}
  function OCIMultiByteStrncmp(envhp:Pdvoid; str1:POraText; len1:size_t; str2:POraText; len2:size_t;
             flag:longint):longint;cdecl;external ocilib name 'OCIMultiByteStrncmp';
{$ELSE}
  OCIMultiByteStrncmp : function (envhp:Pdvoid; str1:POraText; len1:size_t; str2:POraText; len2:size_t;
             flag:longint):longint;cdecl;
{$ENDIF}

  {----------------------- OCIMultiByteStrcat -------------------------------- }
  {
     NAME
       OCIMultiByteStrcat - concatenate multibyte strings
     REMARKS
       This function appends a copy of the multi-byte string pointed to by
       srcstr, including the null-terminator to the end of string pointed to by
       dststr. It returns the number of bytes in the result string not including
       the ending null-terminator.
     RETURNS
       number of bytes in the result string not including the ending
       null-terminator.
     envhp(IN/OUT)
       Pointer to OCI environment handle
     dststr(IN/OUT)
       Pointer to the destination multi-byte string for appending.
     srcstr(IN)
       Pointer to the source string to append.
   }
{$IFNDEF LinkDynamically}
  function OCIMultiByteStrcat(envhp:Pdvoid; dststr:POraText; srcstr:POraText):size_t;cdecl;external ocilib name 'OCIMultiByteStrcat';
{$ELSE}
  OCIMultiByteStrcat : function (envhp:Pdvoid; dststr:POraText; srcstr:POraText):size_t;cdecl;
{$ENDIF}

  {------------------------- OCIMultiByteStrcpy ------------------------------ }
  {
     NAME
       OCIMultiByteStrcpy - copy multibyte string
     REMARKS
       This function copies the multi-byte string pointed to by srcstr,
       including the null-terminator, into the array pointed to by dststr. It
       returns the number of bytes copied not including the ending 
       null-terminator.
     RETURNS
       number of bytes copied not including the ending null-terminator.
     envhp(IN/OUT)
       Pointer to the OCI environment handle.
     srcstr(OUT)
       Pointer to the destination buffer.
     dststr(IN)
       Pointer to the source multi-byte string.
   }
{$IFNDEF LinkDynamically}
  function OCIMultiByteStrcpy(envhp:Pdvoid; dststr:POraText; srcstr:POraText):size_t;cdecl;external ocilib name 'OCIMultiByteStrcpy';
{$ELSE}
  OCIMultiByteStrcpy : function (envhp:Pdvoid; dststr:POraText; srcstr:POraText):size_t;cdecl;
{$ENDIF}

  {----------------------- OCIMultiByteStrlen -------------------------------- }
  {
     NAME
       OCIMultiByteStrlen - Calculate multibyte string length
     REMARKS
       This function computes the number of bytes in the multi-byte string
       pointed to by str, not including the null-terminator, and returns this
       number. 
     RETURNS
       number of bytes not including ending null-terminator.
     str(IN)
       Pointer to the source multi-byte string.
   }
{$IFNDEF LinkDynamically}
  function OCIMultiByteStrlen(envhp:Pdvoid; str:POraText):size_t;cdecl;external ocilib name 'OCIMultiByteStrlen';
{$ELSE}
  OCIMultiByteStrlen : function (envhp:Pdvoid; str:POraText):size_t;cdecl;
{$ENDIF}


  {----------------------- OCIMultiByteStrncat ------------------------------- }
  {
     NAME
       OCIMultiByteStrncat - concatenate string in length
     REMARKS
       This function is similar to OCIMultiBytestrcat(), except that at most n
       bytes from srcstr are appended to dststr. Note that the null-terminator in
       srcstr will stop appending and the function will append as many character
       as possible within n bytes. dststr will be null-terminated. 
     RETURNS
       Number of bytes in the result string not including the ending
       null-terminator.
     envhp(IN/OUT)
       Pointer to OCI environment handle.
     srcstr(IN/OUT)
       Pointer to the destination multi-byte string for appending.
     dststr(IN)
       Pointer to the source multi-byte string to append.
     n(IN)
       Number of bytes from srcstr to append.
   }
{$IFNDEF LinkDynamically}
  function OCIMultiByteStrncat(envhp:Pdvoid; dststr:POraText; srcstr:POraText; n:size_t):size_t;cdecl;external ocilib name 'OCIMultiByteStrncat';
{$ELSE}
  OCIMultiByteStrncat : function (envhp:Pdvoid; dststr:POraText; srcstr:POraText; n:size_t):size_t;cdecl;
{$ENDIF}

  {----------------------- OCIMultiByteStrncpy ------------------------------- }
  {
     NAME
       OCIMultiByteStrncpy - copy multibyte string in length
     REMARKS
       This function is similar to OCIMultiBytestrcpy(), except that at most n
       bytes are copied from the array pointed to by srcstr to the array pointed
       to by dststr. Note that the null-terminator in srcstr will stop coping and
       the function will copy as many character as possible within n bytes. The 
       result string will be null-terminated.
     RETURNS
       number of bytes copied not including the ending null-terminator.
     envhp(IN/OUT)
       Pointer to a OCI environment handle.
     dststr(IN)
       Pointer to the source multi-byte string.
     srcstr(OUT)
       Pointer to the destination buffer.
     n(IN)
       Number of bytes from srcstr to copy.
   }
{$IFNDEF LinkDynamically}
  function OCIMultiByteStrncpy(envhp:Pdvoid; dststr:POraText; srcstr:POraText; n:size_t):size_t;cdecl;external ocilib name 'OCIMultiByteStrncpy';
{$ELSE}
  OCIMultiByteStrncpy : function (envhp:Pdvoid; dststr:POraText; srcstr:POraText; n:size_t):size_t;cdecl;
{$ENDIF}

  {----------------------- OCIMultiByteStrnDisplayLength --------------------- }
  {
     NAME
       OCIMultiByteStrnDisplayLength - calculate the display length for a
                                       multibyt string
     REMARKS
       This function returns the number of display positions occupied by the 
       complete characters within the range of n bytes.
     RETURNS
       number of display positions.
     envhp(IN/OUT)
       OCI environment handle.
     str(IN)
       Pointer to a multi-byte string.
     n(IN)
       Number of bytes to examine.
   }
{$IFNDEF LinkDynamically}
  function OCIMultiByteStrnDisplayLength(envhp:Pdvoid; str1:POraText; n:size_t):size_t;cdecl;external ocilib name 'OCIMultiByteStrnDisplayLength';
{$ELSE}
  OCIMultiByteStrnDisplayLength : function (envhp:Pdvoid; str1:POraText; n:size_t):size_t;cdecl;
{$ENDIF}

  {---------------------- OCIMultiByteStrCaseConversion  --------------------- }
  {
     NAME
       OCIMultiByteStrCaseConversion
     REMARKS
       This function convert the multi-byte string pointed to by srcstr into the
       uppercase or lowercase specified by flag and copies the result into the
       array pointed to by dststr. The result string will be null-terminated.
     RETURNS
       number of bytes for result string not including null-terminator.
     envhp(IN/OUT)
       OCI environment handle.
     dststr(OUT)
       Pointer to destination array.
     srcstr(IN)
       Pointer to source string.
     flag(IN)
       Specify the case to convert:
         OCI_NLS_UPPERCASE: convert to uppercase.
         OCI_NLS_LOWERCASE: convert to lowercase.
       This flag can be ORed with OCI_NLS_LINGUISTIC to specify that the 
       linguistic setting in the locale will be used for case conversion.
   }
{$IFNDEF LinkDynamically}
  function OCIMultiByteStrCaseConversion(envhp:Pdvoid; dststr:POraText; srcstr:POraText; flag:ub4):size_t;cdecl;external ocilib name 'OCIMultiByteStrCaseConversion';
{$ELSE}
  OCIMultiByteStrCaseConversion : function (envhp:Pdvoid; dststr:POraText; srcstr:POraText; flag:ub4):size_t;cdecl;
{$ENDIF}

  {------------------------- OCICharSetToUnicode ----------------------------- }
  {
     NAME
       OCICharSetToUnicode - convert multibyte string into Unicode as UCS2
     REMARKS
       This function converts a multi-byte string pointed to by src to Unicode 
       into the array pointed to by dst. The conversion will stop when it reach
       to the source limitation or destination limitation. 
       The function will return number of characters converted into Unicode.
       If dstlen is zero, it will just return the number of characters for the
       result without real conversion.
     RETURNS
       OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
     envhp(IN/OUT)
       Pointer to an OCI environment handle
     dst(OUT)
       Pointer to a destination buffer
     dstlen(IN)
       Size of destination buffer in character
     src(IN)
       Pointer to multi-byte source string.
     srclen(IN)
       Size of source string in bytes.
     rsize(OUT)
       Number of characters converted.
       If it is a NULL pointer, nothing to return.
   }
{$IFNDEF LinkDynamically}
  function OCICharSetToUnicode(envhp:Pdvoid; dst:Pub2; dstlen:size_t; src:POraText; srclen:size_t;
             rsize:Psize_t):sword;cdecl;external ocilib name 'OCICharSetToUnicode';
{$ELSE}
  OCICharSetToUnicode : function (envhp:Pdvoid; dst:Pub2; dstlen:size_t; src:POraText; srclen:size_t;
             rsize:Psize_t):sword;cdecl;
{$ENDIF}

  {------------------------- OCIUnicodeToCharSet ----------------------------- }
  {
     NAME
       OCIUnicodeToCharSet - convert Unicode into multibyte
     REMARKS
       This function converts a Unicode string pointed to by src to multi-byte
       into the array pointed to by dst. The conversion will stop when it reach
       to the source limitation or destination limitation. The function will
       return number of bytes converted into multi-byte. If dstlen is zero, it
       will just return the number of bytes for the result without real 
       conversion. If a Unicode character is not convertible for the character
       set specified in OCI environment handle, a replacement character will be
       used for it. In this case, OCICharSetConversionIsReplacementUsed() will
       return ture.
     RETURNS
       OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
     envhp(IN/OUT)
       Pointer to an OCI environment handle.
     dst(OUT)
       Pointer to a destination buffer.
     dstlen(IN)
       Size of destination buffer in byte.
     src(IN)
       Pointer to a Unicode string.
     srclen(IN)
       Size of source string in characters.
     rsize(OUT)
       Number of bytes converted.
       If it is a NULL pointer, nothing to return.
   }
{$IFNDEF LinkDynamically}
  function OCIUnicodeToCharSet(envhp:Pdvoid; dst:POraText; dstlen:size_t; src:Pub2; srclen:size_t;
             rsize:Psize_t):sword;cdecl;external ocilib name 'OCIUnicodeToCharSet';
{$ELSE}
  OCIUnicodeToCharSet : function (envhp:Pdvoid; dst:POraText; dstlen:size_t; src:Pub2; srclen:size_t;
             rsize:Psize_t):sword;cdecl;
{$ENDIF}

  {----------------------- OCINlsCharSetConvert ------------------------------ }
  {
     NAME
       OCINlsCharSetConvert - convert between any two character set.
     REMARKS
       This function converts a string pointed to by src in the character set
       specified with srcid to the array pointed to by dst in the character set
       specified with dstid. The conversion will stop when it reaches the source
       limitation or destination limitation. The function will return the number
       of bytes converted into the destination buffer. Even though either source
       or destination character set id is OCI_UTF16ID, given and return data
       length will be represented with the byte length as this function is
       intended for generic purpose. Note the conversion will not stop at null
       data.
       To get character set id from name, OCINlsCharSetNameToId can be used.
       To check if derived data in the destination buffer contains any
       replacement character resulting from conversion failure,
       OCICharSetConversionIsReplacementUsed can be used to get the status.
       Data alignment should be guaranteed by a caller. For example, UTF-16 data
       should be aligned to ub2 type.
  
     RETURNS
       OCI_SUCCESS or OCI_ERROR.
     errhp(IN/OUT)
       OCI error handle. If there is an error, it is recorded in errhp and this
       function returns a NULL pointer. Diagnostic information can be obtained
       by calling OCIErrorGet().
     dstid(IN)
       Character set id for the destination buffer.
     dstp(OUT)
       Pointer to the destination buffer.
     dstlen(IN)
       The maximum byte size of destination buffer.
     srcid(IN)
       Character set id for the source buffer.
     srcp(IN)
       Pointer to the source buffer.
     srclen(IN)
       The length byte size of source buffer.
     rsize(OUT)
       The number of characters converted. If it is a NULL pointer, nothing to
       return.
   }
{$IFNDEF LinkDynamically}
  function OCINlsCharSetConvert(envhp:Pdvoid; errhp:POCIError; dstid:ub2; dstp:Pdvoid; dstlen:size_t;
             srcid:ub2; srcp:Pdvoid; srclen:size_t; rsize:Psize_t):sword;cdecl;external ocilib name 'OCINlsCharSetConvert';
{$ELSE}
  OCINlsCharSetConvert : function (envhp:Pdvoid; errhp:POCIError; dstid:ub2; dstp:Pdvoid; dstlen:size_t;
             srcid:ub2; srcp:Pdvoid; srclen:size_t; rsize:Psize_t):sword;cdecl;
{$ENDIF}

  { ------------------- OCICharsetConversionIsReplacementUsed ---------------- }
  {
     NAME
       OCICharsetConversionIsReplacementUsed - chech if replacement is used in 
                                               conversion
     REMARKS
       This function indicates whether or not the replacement character was used
       for nonconvertible characters in character set conversion in last invoke
       of OCICharsetUcs2ToMb().
     RETURNS
       TRUE is the replacement character was used in last OCICharsetUcs2ToMb()
       invoking, else FALSE.
     envhp(IN/OUT)
       OCI environment handle. This should be the first handle passed to 
       OCICharsetUcs2ToMb().
   }
{$IFNDEF LinkDynamically}
  function OCICharSetConversionIsReplacementUsed(envhp:Pdvoid):boolean;cdecl;external ocilib name 'OCICharSetConversionIsReplacementUsed';
{$ELSE}
  OCICharSetConversionIsReplacementUsed : function (envhp:Pdvoid):boolean;cdecl;
{$ENDIF}

  {------------------- OCINlsEnvironmentVariableGet ----------------- }
  {
     NAME
       OCINlsEnvironmentVariableGet - get a value of NLS environment variable.
  
     DESCRIPTION
       This function retrieves a value of NLS environment variable to the buffer
       pointed to by val. Data type is determined by the parameter specified by
       item. Either numeric data or string data can be retrieved.
  
     RETURNS
       OCI_SUCCESS or OCI_ERROR.
  
     PARAMETERS
     valp(OUT) -
       Pointer to the buffer.
     size(IN) -
       Size of the buffer. This argument is only applicable to string data type,
       but not to numerical data, in such case, it is ignored.
     item(IN) -
       NLS item value, which can be one of following values:
         OCI_NLS_CHARSET_ID  - NLS_LANG character set id in ub2 data type.
         OCI_NLS_NCHARSET_ID - NLS_NCHAR character set id in ub2 data type.
     charset(IN) -
       Character set id for retrieved string data. If it is 0, NLS_LANG will be
       used. OCI_UTF16ID is a valid id. In case of numeric data, this argument
       is ignored.
     rsize(OUT) -
       Size of return value.
  
     NOTE
       This functions is mainly used for retrieving character set id from either
       NLS_LANG or NLS_NCHAR environment variables. If NLS_LANG is not set,
       the default character set id is returned.
       For future extension, the buffer is capable for storing other data types.
   }
{$IFNDEF LinkDynamically}
  function OCINlsEnvironmentVariableGet(valp:Pdvoid; size:size_t; item:ub2; charset:ub2; rsize:Psize_t):sword;cdecl;external ocilib name 'OCINlsEnvironmentVariableGet';
{$ELSE}
  OCINlsEnvironmentVariableGet : function (valp:Pdvoid; size:size_t; item:ub2; charset:ub2; rsize:Psize_t):sword;cdecl;
{$ENDIF}

  {------------------------- OCIMessageOpen ---------------------------------- }
  {
     NAME
       OCIMessageOpen - open a locale message file
     REMARKS
       This function opens a message handle for facility of product in a language
       pointed to by envhp. It first try to open the message file corresponding
       to envhp for the facility. If it successes, it will use that file to
       initialize a message handle, else it will use the default message file
       which is for American language for the facility. The function return a
       pointer pointed to a message handle into msghp parameter.
     RETURNS
       OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
     envhp(IN/OUT)
       A pointer to OCI environment handle for message language.
     errhp(IN/OUT)
       The OCI error handle. If there is an error, it is record in errhp and this
       function returns a NULL pointer. Diagnostic information can be obtained by
       calling OCIErrorGet().
     msghp(OUT)
       a message handle for return
     product(IN)
       A pointer to a product name. Product name is used to locate the directory
       for message in a system dependent way. For example, in Solaris, the
       directory of message files for the product `rdbms' is
       `$ORACLE_HOME/rdbms'.
     facility(IN)
       A pointer to a facility name in the product. It is used to construct a
       message file name. A message file name follows the conversion with 
       facility as prefix. For example, the message file name for facility
       `img' in American language will be `imgus.msb' where `us' is the 
       abbreviation of American language and `msb' as message binary file 
       extension.
     dur(IN)
       Duration for memory allocation for the return message handle. It can be
       the following values:
          OCI_DURATION_CALL
          OCI_DURATION_STATEMENT
          OCI_DURATION_SESSION
          OCI_DURATION_TRANSACTION
       For the detail description, please refer to Memory Related Service
       Interfaces section.
   }
{$IFNDEF LinkDynamically}
  function OCIMessageOpen(envhp:Pdvoid; errhp:POCIError; var msghp:POCIMsg; product:POraText; facility:POraText;
             dur:OCIDuration):sword;cdecl;external ocilib name 'OCIMessageOpen';
{$ELSE}
  OCIMessageOpen : function (envhp:Pdvoid; errhp:POCIError; var msghp:POCIMsg; product:POraText; facility:POraText;
             dur:OCIDuration):sword;cdecl;
{$ENDIF}

  {------------------------- OCIMessageGet ----------------------------------- }
  {
     NAME
       OCIMessageGet - get a locale message from a message handle
     REMARKS
       This function will get message with message number identified by msgno and
       if buflen is not zero, the function will copy the message into the buffer
       pointed to by msgbuf. If buflen is zero, the message will be copied into
       a message buffer inside the message handle pointed to by msgh. For both
       cases. it will return the pointer to the null-terminated message string.
       If it cannot get the message required, it will return a NULL pointer.
     RETURNS
       A pointer to a null-terminated message string on success, otherwise a NULL
       pointer.
     msgh(IN/OUT)
       Pointer to a message handle which was previously opened by
       OCIMessageOpen().
     msgno(IN)
       The message number for getting message.
     msgbuf(OUT)
       Pointer to a destination buffer to the message retrieved. If buflen is
       zero, it can be NULL pointer.
     buflen(IN)
       The size of the above destination buffer.
   }
{$IFNDEF LinkDynamically}
  function OCIMessageGet(msgh:POCIMsg; msgno:ub4; msgbuf:POraText; buflen:size_t):POraText;cdecl;external ocilib name 'OCIMessageGet';
{$ELSE}
  OCIMessageGet : function (msgh:POCIMsg; msgno:ub4; msgbuf:POraText; buflen:size_t):POraText;cdecl;
{$ENDIF}

  {------------------------- OCIMessageClose --------------------------------- }
  {
     NAME
       OCIMessageClose - close a message handle
     REMARKS
       This function closes a message handle pointed to by msgh and frees any
       memory associated with this handle.
     RETURNS
       OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
     envhp(IN/OUT)
       A pointer to OCI environment handle for message language.
     errhp(IN/OUT)
       The OCI error handle. If there is an error, it is record in errhp and this
       function returns a NULL pointer. Diagnostic information can be obtained by
       calling OCIErrorGet().
     msghp(IN/OUT)
       A pointer to a message handle which was previously opened by
       OCIMessageOpen().
   }
{$IFNDEF LinkDynamically}
  function OCIMessageClose(envhp:Pdvoid; errhp:POCIError; msghp:POCIMsg):sword;cdecl;external ocilib name 'OCIMessageClose';
{$ELSE}
  OCIMessageClose : function (envhp:Pdvoid; errhp:POCIError; msghp:POCIMsg):sword;cdecl;
{$ENDIF}

  {--------------- End of Extensions to NLS cartridge service ---------------- }
  {----------------- Extensions to OCI Thread interface --------------------- }
  {****************************************************************************
                                DESCRIPTION
  ******************************************************************************
  1 Threads Interface
  
  The OCIThread package provides a number of commonly used threading
  primitives for use by Oracle customers.  It offers a portable interface to
  threading capabilities native to various platforms.  It does not implement
  threading on platforms which do not have native threading capability.
  
  OCIThread does not provide a portable implementation of multithreaded 
  facilities.  It only serves as a set of portable covers for native 
  multithreaded facilities.  Therefore, platforms that do not have native 
  support for multi-threading will only be able to support a limited 
  implementation of OCIThread.  As a result, products that rely on all of 
  OCIThread's functionality will not port to all platforms.  Products that must 
  port to all platforms must use only a subset of OCIThread's functionality.  
  This issue is discussed further in later sections of this document.
  
  The OCIThread API is split into four main parts.  Each part is described
  briefly here.  The following subsections describe each in greater detail.
  
   1. Initialization and Termination Calls
  
       These calls deal with the initialization and termination of OCIThread.
       Initialization of OCIThread initializes the OCIThread context which is
       a member of the OCI environment or session handle.  This context is 
       required for other OCIThread calls.
  
   2. Passive Threading Primitives
  
       The passive threading primitives include primitives to manipulate mutual
       exclusion (mutex) locks, thread ID's, and thread-specific data keys.
  
       The reason that these primitives are described as 'passive' is that while
       their specifications allow for the existence of multiple threads, they do
       not require it.  This means that it is possible for these primitives to
       be implemented according to specification in both single-threaded and
       multi-threaded environments.
  
       As a result, OCIThread clients that use only these primitives will not
       require the existence of multiple threads in order to work correctly,
       i.e., they will be able to work in single-threaded environments without 
       branching code.
  
   3. Active Threading Primitives
  
       Active threading primitives include primitives dealing with the creation,
       termination, and other manipulation of threads.
  
       The reason that these primitives are described as 'active' is that they
       can only be used in true multi-threaded environments.  Their
       specifications explicitly require that it be possible to have multiple
       threads.  If you need to determine at runtime whether or not you are in a
       multi-threaded environment, call OCIThreadIsMulti() before calling an
       OCIThread active primitive.
  
  
  1.1 Initialization & Termination
  ==================================
  
  The types and functions described in this section are associated with the
  initialization and termination of the OCIThread package.  OCIThread must
  be properly initialized before any of its functionality can be used.
  OCIThread's process initialization function, 'OCIThreadProcessInit()',
  must be called with care; see below.
  
  The observed behavior of the initialization and termination functions is the
  same regardless of whether OCIThread is in single-threaded or multi-threaded
  environment.  It is OK to call the initialization functions from both generic
  and operating system specific (OSD) code.
  
  1.1.1 Types
  
    OCIThreadContext - OCIThread Context
    -------------------------------------
  
      Most calls to OCIThread functions take the OCI environment or session 
      handle as a parameter.  The OCIThread context is part of the OCI 
      environment or session handle and it must be initialized by calling 
      'OCIThreadInit()'.  Termination of the OCIThread context occurs by calling
      'OCIThreadTerm()'.
  
      The OCIThread context is a private data structure.  Clients must NEVER
      attempt to examine the contents of the context.
  
  1.1.2  OCIThreadProcessInit
  
    OCIThreadProcessInit - OCIThread Process INITialization
    --------------------------------------------------------
  
      Description
  
        This function should be called to perform OCIThread process
        initialization.
  
      Prototype
  
        void OCIThreadProcessInit();
  
      Returns
  
        Nothing.
  
      Notes
  
        Whether or not this function needs to be called depends on how OCI
        Thread is going to be used.
  
          * In a single-threaded application, calling this function is optional.
            If it is called at all, the first call to it must occur before calls
            to any other OCIThread functions.  Subsequent calls can be made
            without restriction; they will not have any effect.
  
          * In a multi-threaded application, this function MUST be called.  The
            first call to it MUST occur 'strictly before' any other OCIThread
            calls; i.e., no other calls to OCIThread functions (including other
            calls to this one) can be concurrent with the first call.
            Subsequent calls to this function can be made without restriction;
            they will not have any effect.
  
  
  1.1.3 OCIThreadInit
  
    OCIThreadInit - OCIThread INITialize
    -------------------------------------
  
      Description
  
        This initializes OCIThread context.
  
      Prototype
  
        sword OCIThreadInit(dvoid *hndl, OCIError *err);
  
          hndl(IN/OUT): The OCI environment or session handle.
  
          err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
                       is returned, the error is recorded in err and diagnostic 
                       information can be obtained by calling OCIErrorGet().
  
      Returns
  
        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
  
      Notes
  
        It is illegal for OCIThread clients to try an examine the memory
        pointed to by the returned pointer.
  
        It is safe to make concurrent calls to 'OCIThreadInit()'.  Unlike
        'OCIThreadProcessInit()',  there is no need to have a first call
        that occurs before all the others.
  
        The first time 'OCIThreadInit()' is called, it initilaizes the OCI
        Thread context.  It also saves a pointer to the context in some system
        dependent manner.  Subsequent calls to 'OCIThreadInit()' will return
        the same context.
  
        Each call to 'OCIThreadInit()' must eventually be matched by a call to
        'OCIThreadTerm()'.
  
    OCIThreadTerm - OCIThread TERMinate
    ------------------------------------
  
      Description
  
        This should be called to release the OCIThread context.  It should be
        called exactly once for each call made to 'OCIThreadInit()'.
  
      Prototype
  
        sword OCIThreadTerm(dvoid *hndl, OCIError *err);
  
          hndl(IN/OUT): The OCI environment or session handle.
  
          err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
                       is returned, the error is recorded in err and diagnostic 
                       information can be obtained by calling OCIErrorGet().
  
      Returns
  
        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
  
      Notes
  
        It is safe to make concurrent calls to 'OCIThreadTerm()'.
  
        'OCIThreadTerm()' will not do anything until it has been called as
        many times as 'OCIThreadInit()' has been called.  When that happens,
        it terminates the OCIThread layer and frees the memory allocated for
        the context.  Once this happens, the context should not be re-used.
        It will be necessary to obtain a new one by calling 'OCIThreadInit()'.
  
  
    OCIThreadIsMulti - OCIThread Is Multi-Threaded?
    ------------------------------------------------
  
      Description
  
        This tells the caller whether the application is running in a
        multi-threaded environment or a single-threaded environment.
  
      Prototype
        boolean OCIThreadIsMulti(void);
  
      Returns
  
        TRUE if the environment is multi-threaded;
        FALSE if the environment is single-threaded.
  
  
  1.2 Passive Threading Primitives
  ==================================
  
  1.2.1 Types
  
  The passive threading primitives deal with the manipulation of mutex, 
  thread ID's, and thread-specific data.  Since the specifications of these 
  primitives do not require the existence of multiple threads, they can be 
  used both on multithreaded and single-threaded platforms.
  
  1.2.1.1  OCIThreadMutex - OCIThread Mutual Exclusion Lock
  -----------------------------------------------------------
  
    The type 'OCIThreadMutex' is used to represent a mutual exclusion lock
    (mutex).  A mutex is typically used for one of two purposes: (i) to
    ensure that only one thread accesses a given set of data at a time, or
    (ii) to ensure that only one thread executes a given critical section of
    code at a time.
  
    Mutexes pointer can be declared as parts of client structures or as 
    stand-alone variables.  Before they can be used, they must be initialized 
    using 'OCIThreadMutexInit()'.  Once they are no longer needed, they must be
    destroyed using 'OCIThreadMutexDestroy()'.  A mutex pointer must NOT be 
    used after it is destroyed.
  
    A thread can acquire a mutex by using either 'OCIThreadMutexAcquire()' or
    'OCIThreadMutexTry()'.  They both ensure that only one thread at a time is
    allowed to hold a given mutex.  A thread that holds a mutex can release it
    by calling 'OCIThreadMutexRelease()'.
  
  
  1.2.1.2  OCIThreadKey - OCIThread Key for Thread-Specific Data
  ----------------------------------------------------------------
  
    A key can be thought of as a process-wide variable that has a
    thread-specific value.  What this means is that all the threads in a
    process can use any given key.  However, each thread can examine or modify
    that key independently of the other threads.  The value that a thread sees
    when it examines the key will always be the same as the value that it last
    set for the key.  It will not see any values set for the key by the other
    threads.
  
    The type of the value held by a key is a 'dvoid *' generic pointer.
  
    Keys can be created using 'OCIThreadKeyInit()'.  When a key is created, its
    value is initialized to 'NULL' for all threads.
  
    A thread can set a key's value using 'OCIThreadKeySet()'.  A thread can
    get a key's value using 'OCIThreadKeyGet()'.
  
    The OCIThread key functions will save and retrieve data SPECIFIC TO THE
    THREAD.  When clients maintain a pool of threads and assign the threads to
    different tasks, it *may not* be appropriate for a task to use OCIThread
    key functions to save data associated with it.  Here is a scenario of how
    things can fail: A thread is assigned to execute the initialization of a
    task.  During the initialization, the task stored some data related to it
    in the thread using OCIThread key functions.  After the initialization,
    the thread is returned back to the threads pool.  Later, the threads pool
    manager assigned another thread to perform some operations on the task,
    and the task needs to retrieve those data it stored earlier in
    initialization.  Since the task is running in another thread, it will not
    be able to retrieve the same data back!  Applications that use thread
    pools should be aware of this and be cautious when using OCIThread key
    functions.
  
  
  1.2.1.3  OCIThreadKeyDestFunc - OCIThread Key Destructor Function Type
  ------------------------------------------------------------------------
  
    This is the type of a pointer to a key's destructor routine.  Keys can be
    associated with a destructor routine when they are created (see
    'OCIThreadKeyInit()').
  
    A key's destructor routine will be called whenever a thread that has a
    non-NULL value for the key terminates.
  
    The destructor routine returns nothing and takes one parameter.  The
    parameter will be the value that was set for key when the thread
    terminated.
  
    The destructor routine is guaranteed to be called on a thread's value
    in the key after the termination of the thread and before process
    termination.  No more precise guarantee can be made about the timing
    of the destructor routine call; thus no code in the process may assume
    any post-condition of the destructor routine.  In particular, the
    destructor is not guaranteed to execute before a join call on the
    terminated thread returns.
  
  
  1.2.1.4  OCIThreadId - OCIThread Thread ID
  --------------------------------------------
  
    Type 'OCIThreadId' is the type that will be used to identify a thread.
    At any given time, no two threads will ever have the same 'OCIThreadId'.
    However, 'OCIThreadId' values can be recycled; i.e., once a thread dies,
    a new thread may be created that has the same 'OCIThreadId' as the one
    that died.  In particular, the thread ID must uniquely identify a thread
    T within a process, and it must be consistent and valid in all threads U
    of the process for which it can be guaranteed that T is running
    concurrently with U.  The thread ID for a thread T must be retrievable
    within thread T.  This will be done via OCIThreadIdGet().
  
    The 'OCIThreadId' type supports the concept of a NULL thread ID: the NULL
    thread ID will never be the same as the ID of an actual thread.
  
  
  
  1.2.2 Function prototypes for passive primitives
  --------------------------------------------------
  
  1.2.2.1 Mutex functions
  -------------------------
  
    OCIThreadMutexInit - OCIThread MuteX Initialize
    -----------------------------------------------
  
      Description
  
        This allocate and initializes a mutex.  All mutexes must be 
        initialized prior to use.
  
      Prototype
  
        sword OCIThreadMutexInit(dvoid *hndl, OCIError *err, 
                                 OCIThreadMutex **mutex);
  
          hndl(IN/OUT): The OCI environment or session handle.
  
          err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
                       is returned, the error is recorded in err and diagnostic 
                       information can be obtained by calling OCIErrorGet().
  
          mutex(OUT):  The mutex to initialize.
  
      Returns
  
        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
  
      Notes
  
        Multiple threads must not initialize the same mutex simultaneously.
        Also, a mutex must not be reinitialized until it has been destroyed (see
        'OCIThreadMutexDestroy()').
  
    OCIThreadMutexDestroy - OCIThread MuteX Destroy
    -----------------------------------------------
  
      Description
  
        This destroys and deallocate a mutex.  Each mutex must be destroyed 
        once it is no longer needed.
  
      Prototype
  
        sword OCIThreadMutexDestroy(dvoid *hndl, OCIError *err,
                                    OCIThreadMutex **mutex);
  
          hndl(IN/OUT): The OCI environment or session handle.
  
          err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
                       is returned, the error is recorded in err and diagnostic 
                       information can be obtained by calling OCIErrorGet().
  
          mutex(IN/OUT):   The mutex to destroy.
  
      Returns
  
        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
  
      Notes
  
        It is not legal to destroy a mutex that is uninitialized or is currently
        held by a thread.  The destruction of a mutex must not occur concurrently
        with any other operations on the mutex.  A mutex must not be used after
        it has been destroyed.
  
  
    OCIThreadMutexAcquire - OCIThread MuteX Acquire
    -----------------------------------------------
  
      Description
  
        This acquires a mutex for the thread in which it is called.  If the mutex
        is held by another thread, the calling thread is blocked until it can
        acquire the mutex.
  
      Prototype
  
       sword OCIThreadMutexAcquire(dvoid *hndl, OCIError *err,
                                   OCIThreadMutex *mutex);
  
          hndl(IN/OUT): The OCI environment or session handle.
  
          err(IN/OUT): The OCI error handle.  If there is an error, it is 
                       recorded in err and this function returns OCI_ERROR.  
                       Diagnostic information can be obtained by calling 
                       OCIErrorGet().
  
          mutex(IN/OUT):   The mutex to acquire.
  
      Returns
  
        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
  
      Notes
  
        It is illegal to attempt to acquire an uninitialized mutex.
  
        This function's behavior is undefined if it is used by a thread to
        acquire a mutex that is already held by that thread.
  
  
  
    OCIThreadMutexRelease - OCIThread MuteX Release
    -----------------------------------------------
  
      Description
  
        This releases a mutex.  If there are any threads blocked on the mutex,
        one of them will acquire it and become unblocked.
  
      Prototype
  
        sword OCIThreadMutexRelease(dvoid *hndl, OCIError *err,
                                    OCIThreadMutex *mutex);
  
          hndl(IN/OUT): The OCI environment or session handle.
  
          err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
                       is returned, the error is recorded in err and diagnostic 
                       information can be obtained by calling OCIErrorGet().
  
          mutex(IN/OUT):   The mutex to release.
  
      Returns
  
        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
  
      Notes
  
        It is illegal to attempt to release an uninitialized mutex.  It is also
        illegal for a thread to release a mutex that it does not hold.
  
  
    OCIThreadKeyInit - OCIThread KeY Initialize
    -------------------------------------------
  
      Description
  
        This creates a key.  Each call to this routine allocate and generates 
        a new key that is distinct from all other keys.
  
      Prototype
  
        sword OCIThreadKeyInit(dvoid *hndl, OCIError *err, OCIThreadKey **key,
                               OCIThreadKeyDestFunc destFn);
  
          hndl(IN/OUT): The OCI environment or session handle.
  
          err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
                       is returned, the error is recorded in err and diagnostic 
                       information can be obtained by calling OCIErrorGet().
  
          key(OUT):    The 'OCIThreadKey' in which to create the new key.
  
          destFn(IN):  The destructor for the key.  NULL is permitted.
  
      Returns
  
        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
  
      Notes
  
        Once this function executes successfully, a pointer to an allocated and 
        initialized key is return.  That key can be used with 'OCIThreadKeyGet()'
        and 'OCIThreadKeySet()'.  The initial value of the key will be 'NULL' for
        all threads.
  
        It is illegal for this function to be called more than once to create the
        same key (i.e., to be called more than once with the same value for the
        'key' parameter).
  
        If the 'destFn' parameter is not NULL, the routine pointed to by 'destFn'
        will be called whenever a thread that has a non-NULL value for the key
        terminates.  The routine will be called with one parameter.  The
        parameter will be the key's value for the thread at the time at which the
        thread terminated.
        If the key does not need a destructor function, pass NULL for 'destFn'.
  
  
    OCIThreadKeyDestroy - OCIThread KeY DESTROY
    -------------------------------------------
  
     Description
  
       Destroy and deallocate the key pointed to by 'key'.
  
      Prototype
  
        sword OCIThreadKeyDestroy(dvoid *hndl, OCIError *err, 
                                  OCIThreadKey **key);
  
          hndl(IN/OUT): The OCI environment or session handle.
  
          err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
                       is returned, the error is recorded in err and diagnostic 
                       information can be obtained by calling OCIErrorGet().
  
          key(IN/OUT):  The 'OCIThreadKey' in which to destroy the key.
   
      Returns
  
        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
  
      Notes
  
        This is different from the destructor function callback passed to the
        key create routine.  This new destroy function 'OCIThreadKeyDestroy' is 
        used to terminate any resources OCI THREAD acquired when it created 
        'key'.  [The 'OCIThreadKeyDestFunc' callback type is a key VALUE 
        destructor; it does in no way operate on the key itself.]
  
        This must be called once the user has finished using the key.  Not
        calling the key destroy function may result in memory leaks.
  
  
  
  
  1.2.2.2 Thread Key operations
  -------------------------------
  
    OCIThreadKeyGet - OCIThread KeY Get value
    -----------------------------------------
  
      Description
  
        This gets the calling thread's current value for a key.
  
      Prototype
  
        sword OCIThreadKeyGet(dvoid *hndl, OCIError *err, OCIThreadKey *key,
                              dvoid **pValue);
  
          hndl(IN/OUT): The OCI environment or session handle.
  
          err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
                       is returned, the error is recorded in err and diagnostic 
                       information can be obtained by calling OCIErrorGet().
  
          key(IN):          The key.
  
          pValue(IN/OUT):   The location in which to place the thread-specific
                            key value.
  
      Returns
  
        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
  
      Notes
  
        It is illegal to use this function on a key that has not been created
        using 'OCIThreadKeyInit()'.
  
        If the calling thread has not yet assigned a value to the key, 'NULL' is
        placed in the location pointed to by 'pValue'.
  
  
    OCIThreadKeySet - OCIThread KeY Set value
    -----------------------------------------
  
      Description
  
        This sets the calling thread's value for a key.
  
      Prototype
  
        sword OCIThreadKeySet(dvoid *hndl, OCIError *err, OCIThreadKey *key,
                              dvoid *value);
  
          hndl(IN/OUT): The OCI environment or session handle.
  
          err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
                       is returned, the error is recorded in err and diagnostic 
                       information can be obtained by calling OCIErrorGet().
  
          key(IN/OUT): The key.
  
          value(IN):   The thread-specific value to set in the key.
  
      Returns
  
        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
  
      Notes
  
        It is illegal to use this function on a key that has not been created
        using 'OCIThreadKeyInit()'.
  
  1.2.2.3  Thread Id
  --------------------
  
    OCIThreadIdInit - OCIThread Thread Id INITialize
    --------------------------------------------------
  
      Description
  
        Allocate and initialize the thread id 'tid'.
  
      Prototype
  
        sword OCIThreadIdInit(dvoid *hndl, OCIError *err, OCIThreadId **tid);
  
          hndl(IN/OUT): The OCI environment or session handle.
  
          err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
                       is returned, the error is recorded in err and diagnostic 
                       information can be obtained by calling OCIErrorGet().
  
          tid (OUT):   Pointer to the thread ID to initialize.
  
      Returns
  
        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
  
  
    OCIThreadIdDestroy - OCIThread Thread Id DESTROY
    --------------------------------------------------
  
      Description
  
        Destroy and deallocate the thread id 'tid'.
  
      Prototype
  
        sword OCIThreadIdDestroy(dvoid *hndl, OCIError *err, OCIThreadId **tid);
  
          hndl(IN/OUT): The OCI environment or session handle.
  
          err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
                       is returned, the error is recorded in err and diagnostic 
                       information can be obtained by calling OCIErrorGet().
  
          tid(IN/OUT):        Pointer to the thread ID to destroy.
  
      Returns
  
        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
  
      Note
  
        'tid' should be initialized by OCIThreadIdInit().
  
  
    OCIThreadIdSet - OCIThread Thread Id Set
    -----------------------------------------
  
      Description
  
        This sets one 'OCIThreadId' to another.
  
      Prototype
  
        sword OCIThreadIdSet(dvoid *hndl, OCIError *err, 
                             OCIThreadId *tidDest,
                             OCIThreadId *tidSrc);
  
          hndl(IN/OUT): The OCI environment or session handle.
  
          err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
                       is returned, the error is recorded in err and diagnostic 
                       information can be obtained by calling OCIErrorGet().
  
          tidDest(OUT):   This should point to the location of the 'OCIThreadId'
                          to be set to.
  
          tidSrc(IN):     This should point to the 'OCIThreadId' to set from.
  
      Returns
  
        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
  
      Notes
  
        'tid' should be initialized by OCIThreadIdInit().
  
  
    OCIThreadIdSetNull - OCIThread Thread Id Set Null
    ---------------------------------------------------------
  
      Description
  
        This sets the NULL thread ID to a given 'OCIThreadId'.
  
      Prototype
  
        sword OCIThreadIdSetNull(dvoid *hndl, OCIError *err,
                                 OCIThreadId *tid);
  
          hndl(IN/OUT): The OCI environment or session handle.
  
          err(IN/OUT): The OCI error handle.  If there is an error, it is 
                       recorded in err and this function returns OCI_ERROR.  
                       Diagnostic information can be obtained by calling 
                       OCIErrorGet().
  
          tid(OUT):    This should point to the 'OCIThreadId' in which to put
                       the NULL thread ID.
  
      Returns
  
        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
  
      Notes
  
        'tid' should be initialized by OCIThreadIdInit().
  
  
    OCIThreadIdGet - OCIThread Thread Id Get
    ------------------------------------------
  
      Description
  
        This retrieves the 'OCIThreadId' of the thread in which it is called.
  
      Prototype
  
        sword OCIThreadIdGet(dvoid *hndl, OCIError *err,
                             OCIThreadId *tid);
  
          hndl(IN/OUT): The OCI environment or session handle.
  
          err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
                       is returned, the error is recorded in err and diagnostic 
                       information can be obtained by calling OCIErrorGet().
  
          tid(OUT):    This should point to the location in which to place the
                       ID of the calling thread.
  
      Returns
  
        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
  
      Notes
  
        'tid' should be initialized by OCIThreadIdInit().
  
        When OCIThread is used in a single-threaded environment,
        OCIThreadIdGet() will always place the same value in the location
        pointed to by 'tid'.  The exact value itself is not important.  The
        important thing is that it is not the same as the NULL thread ID and
        that it is always the same value.
  
  
    OCIThreadIdSame - OCIThread Thread Ids Same?
    ----------------------------------------------
  
      Description
  
        This determines whether or not two 'OCIThreadId's represent the same
        thread.
  
      Prototype
  
        sword OCIThreadIdSame(dvoid *hndl, OCIError *err,
                              OCIThreadId *tid1, OCIThreadId *tid2,
                              boolean *result);
  
          hndl(IN/OUT): The OCI environment or session handle.
  
          err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
                       is returned, the error is recorded in err and diagnostic 
                       information can be obtained by calling OCIErrorGet().
  
          tid1(IN):   Pointer to the first 'OCIThreadId'.
  
          tid2(IN):   Pointer to the second 'OCIThreadId'.
          
          result(IN/OUT): Pointer to the result.
  
      Returns
  
        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
  
      Notes
  
        If 'tid1' and 'tid2' represent the same thread, 'result' is set to TRUE.
        Otherwise, 'result' is set to FALSE.
  
        'result' is set to TRUE if both 'tid1' and 'tid2' are the NULL thread ID.
  
        'ti1d' and 'tid2' should be initialized by OCIThreadIdInit().
  
  
    OCIThreadIdNull - OCIThread Thread Id NULL?
    ---------------------------------------------
  
      Description
  
        This determines whether or not a given 'OCIThreadId' is the NULL thread
        ID.
  
      Prototype
  
        sword OCIThreadIdNull(dvoid *hndl, OCIError *err,
                              OCIThreadId *tid,
                              boolean *result);
  
          hndl(IN/OUT): The OCI environment or session handle.
  
          err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
                       is returned, the error is recorded in err and diagnostic 
                       information can be obtained by calling OCIErrorGet().
  
          tid(IN):    Pointer to the 'OCIThreadId' to check.
  
          result(IN/OUT): Pointer to the result.
  
      Returns
  
        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
  
      Notes
  
        If 'tid' is the NULL thread ID, 'result' is set to TRUE.  Otherwise, 
        'result' is set to FALSE.
  
        'tid' should be initialized by OCIThreadIdInit().
  
  
  1.3 Active Threading Primitives
  =================================
  
  The active threading primitives deal with the manipulation of actual
  threads.  Because the specifications of most of these primitives require
  that it be possible to have multiple threads, they work correctly only in
  the enabled OCIThread; In the disabled OCIThread, they always return
  failure.  The exception is OCIThreadHandleGet(); it may be called in a 
  single-threaded environment, in which case it will have no effect.
  
  Active primitives should only be called by code running in a multi-threaded
  environment.  You can call OCIThreadIsMulti() to determine whether the 
  environment is multi-threaded or single-threaded.
  
  
  1.3.1  Types
  --------------
  
  1.3.1.1    OCIThreadHandle - OCIThread Thread Handle
  ------------------------------------------------------
  
    Type 'OCIThreadHandle' is used to manipulate a thread in the active
    primitives:  OCIThreadJoin()and OCIThreadClose().  A thread handle opened by
    OCIThreadCreate() must be closed in a matching call to
    OCIThreadClose().  A thread handle is invalid after the call to
    OCIThreadClose().
  
    The distinction between a thread ID and a thread handle in OCIThread usage
    follows the distinction between the thread ID and the thread handle on
    Windows NT.  On many platforms, the underlying native types are the same.
  
  
  1.3.2  Functions
  ------------------
  
    OCIThreadHndInit - OCIThread HaNDle Initialize
    ----------------------------------------------
  
      Description
  
        Allocate and initialize the thread handle.
  
      Prototype
  
        sword OCIThreadHndInit(dvoid *hndl, OCIError *err, 
                               OCIThreadHandle **thnd);
  
          hndl(IN/OUT): The OCI environment or session handle.
  
          err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
                       is returned, the error is recorded in err and diagnostic 
                       information can be obtained by calling OCIErrorGet().
  
          thnd(OUT):   The address of pointer to the thread handle to initialize.
  
      Returns
  
        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
  
  
    OCIThreadHndDestroy - OCIThread HaNDle Destroy
    ----------------------------------------------
  
      Description
  
        Destroy and deallocate the thread handle.
  
      Prototype
  
        sword OCIThreadHndDestroy(dvoid *hndl, OCIError *err, 
                                  OCIThreadHandle **thnd);
  
          hndl(IN/OUT): The OCI environment or session handle.
  
          err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
                       is returned, the error is recorded in err and diagnostic 
                       information can be obtained by calling OCIErrorGet().
  
          thnd(IN/OUT):  The address of pointer to the thread handle to destroy.
  
      Returns
  
        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
  
      Notes
  
        'thnd' should be initialized by OCIThreadHndInit().
  
  
    OCIThreadCreate - OCIThread Thread Create
    -----------------------------------------
  
      Description
  
        This creates a new thread.
  
      Prototype
  
        sword OCIThreadCreate(dvoid *hndl, OCIError *err,
                              void (*start)(dvoid *), dvoid *arg,
                              OCIThreadId *tid, OCIThreadHandle *tHnd);
  
          hndl(IN/OUT): The OCI environment or session handle.
  
          err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
                       is returned, the error is recorded in err and diagnostic 
                       information can be obtained by calling OCIErrorGet().
  
          start(IN):    The function in which the new thread should begin
                        execution.
  
          arg(IN):      The argument to give the function pointed to by 'start'.
  
          tid(IN/OUT):  If not NULL, gets the ID for the new thread.
  
          tHnd(IN/OUT): If not NULL, gets the handle for the new thread.
  
      Returns
  
        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
  
      Notes
  
        The new thread will start by executing a call to the function pointed
        to by 'start' with the argument given by 'arg'.  When that function
        returns, the new thread will terminate.  The function should not
        return a value and should accept one parameter, a 'dvoid *'.
  
        The call to OCIThreadCreate() must be matched by a call to
        OCIThreadClose() if and only if tHnd is non-NULL.
  
        If tHnd is NULL, a thread ID placed in *tid will not be valid in the
        calling thread because the timing of the spawned thread's termination
        is unknown.
  
        'tid' should be initialized by OCIThreadIdInit().
  
        'thnd' should be initialized by OCIThreadHndInit().
  
  
  
    OCIThreadJoin - OCIThread Thread Join
    -------------------------------------
  
      Description
  
        This function allows the calling thread to 'join' with another thread.
        It blocks the caller until the specified thread terminates.
  
      Prototype
  
        sword OCIThreadJoin(dvoid *hndl, OCIError *err, OCIThreadHandle *tHnd);
  
          hndl(IN/OUT): The OCI environment or session handle.
  
          err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
                       is returned, the error is recorded in err and diagnostic 
                       information can be obtained by calling OCIErrorGet().
  
          tHnd(IN):    The 'OCIThreadHandle' of the thread to join with.
  
      Returns
  
        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
  
      Notes
  
        'thnd' should be initialized by OCIThreadHndInit().
  
        The result of multiple threads all trying to join with the same thread is
        undefined.
  
  
    OCIThreadClose - OCIThread Thread Close
    ---------------------------------------
  
     Description
  
       This function should be called to close a thread handle.
  
     Prototype
  
       sword OCIThreadClose(dvoid *hndl, OCIError *err, OCIThreadHandle *tHnd);
  
          hndl(IN/OUT): The OCI environment or session handle.
  
          err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
                       is returned, the error is recorded in err and diagnostic 
                       information can be obtained by calling OCIErrorGet().
  
          tHnd(IN/OUT):    The OCIThread thread handle to close.
  
     Returns
  
        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
  
     Notes
  
        'thnd' should be initialized by OCIThreadHndInit().
  
        Both thread handle and the thread ID that was returned by the same call
        to OCIThreadCreate() are invalid after the call to OCIThreadClose().
  
  
  
    OCIThreadHandleGet - OCIThread Thread Get Handle
    ------------------------------------------------
  
      Description
  
        Retrieve the 'OCIThreadHandle' of the thread in which it is called.
  
      Prototype
  
        sword OCIThreadHandleGet(dvoid *hndl, OCIError *err,
                                 OCIThreadHandle *tHnd);
  
          hndl(IN/OUT): The OCI environment or session handle.
  
          err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
                       is returned, the error is recorded in err and diagnostic 
                       information can be obtained by calling OCIErrorGet().
  
          tHnd(IN/OUT):      If not NULL, the location to place the thread
                             handle for the thread.
  
       Returns
  
        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
  
      Notes
  
        'thnd' should be initialized by OCIThreadHndInit().   
  
        The thread handle 'tHnd' retrieved by this function must be closed 
        with OCIThreadClose() and destroyed by OCIThreadHndDestroy() after it
        is used.
  
  
  
  
  1.4 Using OCIThread
  =====================
  
  This section summarizes some of the more important details relating to the use
  of OCIThread.
  
    * Process initialization
  
      OCIThread only requires that the process initialization function
      ('OCIThreadProcessInit()') be called when OCIThread is being used in a
      multi-threaded application.  Failing to call 'OCIThreadProcessInit()' in
      a single-threaded application is not an error.
  
    * OCIThread initialization
  
      Separate calls to 'OCIThreadInit()' will all return the same OCIThread
      context.
  
      Also, remember that each call to 'OCIThreadInit()' must eventually be
      matched by a call to 'OCIThreadTerm()'.
  
    * Active vs. Passive Threading primitives
  
      OCIThread client code written without using any active primitives can be
      compiled and used without change on both single-threaded and
      multi-threaded platforms.
  
      OCIThread client code written using active primitives will only work
      correctly on multi-threaded platforms.  In order to write a version of the
      same application to run on single-threaded platform, it is necessary to 
      branch the your code, whether by branching versions of the source file or 
      by branching at runtime with the OCIThreadIsMulti() call.
  
  ***************************************************************************** }
  {****************************************************************************
                           ACTUAL PROTOTYPE DECLARATIONS
  ***************************************************************************** }
{$IFNDEF LinkDynamically}
  procedure OCIThreadProcessInit;cdecl;external ocilib name 'OCIThreadProcessInit';

  function OCIThreadInit(hndl:Pdvoid; err:POCIError):sword;cdecl;external ocilib name 'OCIThreadInit';

  function OCIThreadTerm(hndl:Pdvoid; err:POCIError):sword;cdecl;external ocilib name 'OCIThreadTerm';

  function OCIThreadIsMulti:boolean;cdecl;external ocilib name 'OCIThreadIsMulti';

  function OCIThreadMutexInit(hndl:Pdvoid; err:POCIError; var mutex:POCIThreadMutex):sword;cdecl;external ocilib name 'OCIThreadMutexInit';

  function OCIThreadMutexDestroy(hndl:Pdvoid; err:POCIError; var mutex:POCIThreadMutex):sword;cdecl;external ocilib name 'OCIThreadMutexDestroy';

  function OCIThreadMutexAcquire(hndl:Pdvoid; err:POCIError; mutex:POCIThreadMutex):sword;cdecl;external ocilib name 'OCIThreadMutexAcquire';

  function OCIThreadMutexRelease(hndl:Pdvoid; err:POCIError; mutex:POCIThreadMutex):sword;cdecl;external ocilib name 'OCIThreadMutexRelease';

  function OCIThreadKeyInit(hndl:Pdvoid; err:POCIError; var key:POCIThreadKey; destFn:OCIThreadKeyDestFunc):sword;cdecl;external ocilib name 'OCIThreadKeyInit';

  function OCIThreadKeyDestroy(hndl:Pdvoid; err:POCIError; var key:POCIThreadKey):sword;cdecl;external ocilib name 'OCIThreadKeyDestroy';

  function OCIThreadKeyGet(hndl:Pdvoid; err:POCIError; key:POCIThreadKey; pValue:PPdvoid):sword;cdecl;external ocilib name 'OCIThreadKeyGet';

  function OCIThreadKeySet(hndl:Pdvoid; err:POCIError; key:POCIThreadKey; value:Pdvoid):sword;cdecl;external ocilib name 'OCIThreadKeySet';

  function OCIThreadIdInit(hndl:Pdvoid; err:POCIError; var tid:POCIThreadId):sword;cdecl;external ocilib name 'OCIThreadIdInit';

  function OCIThreadIdDestroy(hndl:Pdvoid; err:POCIError; var tid:POCIThreadId):sword;cdecl;external ocilib name 'OCIThreadIdDestroy';

  function OCIThreadIdSet(hndl:Pdvoid; err:POCIError; tidDest:POCIThreadId; tidSrc:POCIThreadId):sword;cdecl;external ocilib name 'OCIThreadIdSet';

  function OCIThreadIdSetNull(hndl:Pdvoid; err:POCIError; tid:POCIThreadId):sword;cdecl;external ocilib name 'OCIThreadIdSetNull';

  function OCIThreadIdGet(hndl:Pdvoid; err:POCIError; tid:POCIThreadId):sword;cdecl;external ocilib name 'OCIThreadIdGet';

  function OCIThreadIdSame(hndl:Pdvoid; err:POCIError; tid1:POCIThreadId; tid2:POCIThreadId; result:Pboolean):sword;cdecl;external ocilib name 'OCIThreadIdSame';

  function OCIThreadIdNull(hndl:Pdvoid; err:POCIError; tid:POCIThreadId; result:Pboolean):sword;cdecl;external ocilib name 'OCIThreadIdNull';

  function OCIThreadHndInit(hndl:Pdvoid; err:POCIError; var thnd:POCIThreadHandle):sword;cdecl;external ocilib name 'OCIThreadHndInit';

  function OCIThreadHndDestroy(hndl:Pdvoid; err:POCIError; var thnd:POCIThreadHandle):sword;cdecl;external ocilib name 'OCIThreadHndDestroy';
{$ELSE}
var OCIThreadProcessInit : procedure;cdecl;

   OCIThreadInit : function (hndl:Pdvoid; err:POCIError):sword;cdecl;

   OCIThreadTerm : function (hndl:Pdvoid; err:POCIError):sword;cdecl;

   OCIThreadIsMulti: function : boolean;cdecl;

   OCIThreadMutexInit : function (hndl:Pdvoid; err:POCIError; var mutex:POCIThreadMutex):sword;cdecl;

   OCIThreadMutexDestroy : function (hndl:Pdvoid; err:POCIError; var mutex:POCIThreadMutex):sword;cdecl;

   OCIThreadMutexAcquire : function (hndl:Pdvoid; err:POCIError; mutex:POCIThreadMutex):sword;cdecl;

   OCIThreadMutexRelease : function (hndl:Pdvoid; err:POCIError; mutex:POCIThreadMutex):sword;cdecl;

   OCIThreadKeyInit : function (hndl:Pdvoid; err:POCIError; var key:POCIThreadKey; destFn:OCIThreadKeyDestFunc):sword;cdecl;

   OCIThreadKeyDestroy : function (hndl:Pdvoid; err:POCIError; var key:POCIThreadKey):sword;cdecl;

   OCIThreadKeyGet : function (hndl:Pdvoid; err:POCIError; key:POCIThreadKey; pValue:PPdvoid):sword;cdecl;

   OCIThreadKeySet : function (hndl:Pdvoid; err:POCIError; key:POCIThreadKey; value:Pdvoid):sword;cdecl;

   OCIThreadIdInit : function (hndl:Pdvoid; err:POCIError; var tid:POCIThreadId):sword;cdecl;

   OCIThreadIdDestroy : function (hndl:Pdvoid; err:POCIError; var tid:POCIThreadId):sword;cdecl;

   OCIThreadIdSet : function (hndl:Pdvoid; err:POCIError; tidDest:POCIThreadId; tidSrc:POCIThreadId):sword;cdecl;

   OCIThreadIdSetNull : function (hndl:Pdvoid; err:POCIError; tid:POCIThreadId):sword;cdecl;

   OCIThreadIdGet : function (hndl:Pdvoid; err:POCIError; tid:POCIThreadId):sword;cdecl;

   OCIThreadIdSame : function (hndl:Pdvoid; err:POCIError; tid1:POCIThreadId; tid2:POCIThreadId; result:Pboolean):sword;cdecl;

   OCIThreadIdNull : function (hndl:Pdvoid; err:POCIError; tid:POCIThreadId; result:Pboolean):sword;cdecl;

   OCIThreadHndInit : function (hndl:Pdvoid; err:POCIError; var thnd:POCIThreadHandle):sword;cdecl;

   OCIThreadHndDestroy : function (hndl:Pdvoid; err:POCIError; var thnd:POCIThreadHandle):sword;cdecl;
{$ENDIF}

  type
    tstart = procedure (_para1:Pdvoid);

{$IFNDEF LinkDynamically}
  function OCIThreadCreate(hndl:Pdvoid; err:POCIError; start :tstart; arg:Pdvoid; tid:POCIThreadId;
             tHnd:POCIThreadHandle):sword;cdecl;external ocilib name 'OCIThreadCreate';

  function OCIThreadJoin(hndl:Pdvoid; err:POCIError; tHnd:POCIThreadHandle):sword;cdecl;external ocilib name 'OCIThreadJoin';

  function OCIThreadClose(hndl:Pdvoid; err:POCIError; tHnd:POCIThreadHandle):sword;cdecl;external ocilib name 'OCIThreadClose';

  function OCIThreadHandleGet(hndl:Pdvoid; err:POCIError; tHnd:POCIThreadHandle):sword;cdecl;external ocilib name 'OCIThreadHandleGet';
{$ELSE}
var OCIThreadCreate : function (hndl:Pdvoid; err:POCIError; start :tstart; arg:Pdvoid; tid:POCIThreadId;
             tHnd:POCIThreadHandle):sword;cdecl;

  OCIThreadJoin : function (hndl:Pdvoid; err:POCIError; tHnd:POCIThreadHandle):sword;cdecl;

  OCIThreadClose : function (hndl:Pdvoid; err:POCIError; tHnd:POCIThreadHandle):sword;cdecl;

  OCIThreadHandleGet : function (hndl:Pdvoid; err:POCIError; tHnd:POCIThreadHandle):sword;cdecl;
{$ENDIF}

  {----------------- End OCI Thread interface Extensions --------------------- }
  {------------------ Begin OCI Row Callback Interfaces ---------------------- }

  type

     OCIBindRowCallback = function (ctx:Pdvoid):sword;cdecl;

     OCIFetchRowCallback = function (ctx:Pdvoid):sword;cdecl;
  {------------------ Begin OCI Row Callback Interfaces ---------------------- }
  {--------------- Begin OCI Client Notification Interfaces ------------------ }

     OCISubscriptionNotify = function (ctx:Pdvoid; subscrhp:POCISubscription; pay:Pdvoid; payl:ub4; desc:Pdvoid; 
                  mode:ub4):ub4;cdecl;

{$IFNDEF LinkDynamically}
  function OCISubscriptionRegister(svchp:POCISvcCtx; var subscrhpp:POCISubscription; count:ub2; errhp:POCIError; mode:ub4):sword;cdecl;external ocilib name 'OCISubscriptionRegister';

  function OCISubscriptionPost(svchp:POCISvcCtx; var subscrhpp:POCISubscription; count:ub2; errhp:POCIError; mode:ub4):sword;cdecl;external ocilib name 'OCISubscriptionPost';

  function OCISubscriptionUnRegister(svchp:POCISvcCtx; subscrhp:POCISubscription; errhp:POCIError; mode:ub4):sword;cdecl;external ocilib name 'OCISubscriptionUnRegister';

  function OCISubscriptionDisable(subscrhp:POCISubscription; errhp:POCIError; mode:ub4):sword;cdecl;external ocilib name 'OCISubscriptionDisable';

  function OCISubscriptionEnable(subscrhp:POCISubscription; errhp:POCIError; mode:ub4):sword;cdecl;external ocilib name 'OCISubscriptionEnable';

  {------------------- End OCI Publish/Subscribe Interfaces ------------------ }
  {----------------- Extensions to Datetime interfaces ----------------------- }
  {--------------------- Actual Prototypes ----------------------------------- }
  function OCIDateTimeGetTime(hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; hr:Pub1; mm:Pub1; 
             ss:Pub1; fsec:Pub4):sword;cdecl;external ocilib name 'OCIDateTimeGetTime';

  function OCIDateTimeGetDate(hndl:Pdvoid; err:POCIError; date:POCIDateTime; yr:Psb2; mnth:Pub1;
             dy:Pub1):sword;cdecl;external ocilib name 'OCIDateTimeGetDate';

  function OCIDateTimeGetTimeZoneOffset(hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; hr:Psb1; mm:Psb1):sword;cdecl;external ocilib name 'OCIDateTimeGetTimeZoneOffset';

  function OCIDateTimeConstruct(hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; yr:sb2; mnth:ub1; 
             dy:ub1; hr:ub1; mm:ub1; ss:ub1; fsec:ub4; 
             timezone:POraText; timezone_length:size_t):sword;cdecl;external ocilib name 'OCIDateTimeConstruct';

  function OCIDateTimeSysTimeStamp(hndl:Pdvoid; err:POCIError; sys_date:POCIDateTime):sword;cdecl;external ocilib name 'OCIDateTimeSysTimeStamp';

  function OCIDateTimeAssign(hndl:Pdvoid; err:POCIError; from:POCIDateTime; cto:POCIDateTime):sword;cdecl;external ocilib name 'OCIDateTimeAssign';

  function OCIDateTimeToText(hndl:Pdvoid; err:POCIError; date:POCIDateTime; fmt:POraText; fmt_length:ub1;
             fsprec:ub1; lang_name:POraText; lang_length:size_t; buf_size:Pub4; buf:POraText):sword;cdecl;external ocilib name 'OCIDateTimeToText';

  function OCIDateTimeFromText(hndl:Pdvoid; err:POCIError; date_str:POraText; dstr_length:size_t; fmt:POraText;
             fmt_length:ub1; lang_name:POraText; lang_length:size_t; date:POCIDateTime):sword;cdecl;external ocilib name 'OCIDateTimeFromText';

  function OCIDateTimeCompare(hndl:Pdvoid; err:POCIError; date1:POCIDateTime; date2:POCIDateTime; result:Psword):sword;cdecl;external ocilib name 'OCIDateTimeCompare';

  function OCIDateTimeCheck(hndl:Pdvoid; err:POCIError; date:POCIDateTime; valid:Pub4):sword;cdecl;external ocilib name 'OCIDateTimeCheck';

  function OCIDateTimeConvert(hndl:Pdvoid; err:POCIError; indate:POCIDateTime; outdate:POCIDateTime):sword;cdecl;external ocilib name 'OCIDateTimeConvert';

  function OCIDateTimeSubtract(hndl:Pdvoid; err:POCIError; indate1:POCIDateTime; indate2:POCIDateTime; inter:POCIInterval):sword;cdecl;external ocilib name 'OCIDateTimeSubtract';

  function OCIDateTimeIntervalAdd(hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; inter:POCIInterval; outdatetime:POCIDateTime):sword;cdecl;external ocilib name 'OCIDateTimeIntervalAdd';

  function OCIDateTimeIntervalSub(hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; inter:POCIInterval; outdatetime:POCIDateTime):sword;cdecl;external ocilib name 'OCIDateTimeIntervalSub';

  function OCIIntervalSubtract(hndl:Pdvoid; err:POCIError; minuend:POCIInterval; subtrahend:POCIInterval; result:POCIInterval):sword;cdecl;external ocilib name 'OCIIntervalSubtract';

  function OCIIntervalAdd(hndl:Pdvoid; err:POCIError; addend1:POCIInterval; addend2:POCIInterval; result:POCIInterval):sword;cdecl;external ocilib name 'OCIIntervalAdd';

  function OCIIntervalMultiply(hndl:Pdvoid; err:POCIError; inter:POCIInterval; nfactor:POCINumber; result:POCIInterval):sword;cdecl;external ocilib name 'OCIIntervalMultiply';

  function OCIIntervalDivide(hndl:Pdvoid; err:POCIError; dividend:POCIInterval; divisor:POCINumber; result:POCIInterval):sword;cdecl;external ocilib name 'OCIIntervalDivide';

  function OCIIntervalCompare(hndl:Pdvoid; err:POCIError; inter1:POCIInterval; inter2:POCIInterval; result:Psword):sword;cdecl;external ocilib name 'OCIIntervalCompare';

  function OCIIntervalFromNumber(hndl:Pdvoid; err:POCIError; inter:POCIInterval; number:POCINumber):sword;cdecl;external ocilib name 'OCIIntervalFromNumber';

  function OCIIntervalFromText(hndl:Pdvoid; err:POCIError; inpstr:POraText; str_len:size_t; result:POCIInterval):sword;cdecl;external ocilib name 'OCIIntervalFromText';

  function OCIIntervalToText(hndl:Pdvoid; err:POCIError; inter:POCIInterval; lfprec:ub1; fsprec:ub1;
             buffer:POraText; buflen:size_t; resultlen:Psize_t):sword;cdecl;external ocilib name 'OCIIntervalToText';

  function OCIIntervalToNumber(hndl:Pdvoid; err:POCIError; inter:POCIInterval; number:POCINumber):sword;cdecl;external ocilib name 'OCIIntervalToNumber';

  function OCIIntervalCheck(hndl:Pdvoid; err:POCIError; interval:POCIInterval; valid:Pub4):sword;cdecl;external ocilib name 'OCIIntervalCheck';

  function OCIIntervalAssign(hndl:Pdvoid; err:POCIError; ininter:POCIInterval; outinter:POCIInterval):sword;cdecl;external ocilib name 'OCIIntervalAssign';

  function OCIIntervalSetYearMonth(hndl:Pdvoid; err:POCIError; yr:sb4; mnth:sb4; result:POCIInterval):sword;cdecl;external ocilib name 'OCIIntervalSetYearMonth';

  function OCIIntervalGetYearMonth(hndl:Pdvoid; err:POCIError; yr:Psb4; mnth:Psb4; result:POCIInterval):sword;cdecl;external ocilib name 'OCIIntervalGetYearMonth';

  function OCIIntervalSetDaySecond(hndl:Pdvoid; err:POCIError; dy:sb4; hr:sb4; mm:sb4; 
             ss:sb4; fsec:sb4; result:POCIInterval):sword;cdecl;external ocilib name 'OCIIntervalSetDaySecond';

  function OCIIntervalGetDaySecond(hndl:Pdvoid; err:POCIError; dy:Psb4; hr:Psb4; mm:Psb4;
             ss:Psb4; fsec:Psb4; result:POCIInterval):sword;cdecl;external ocilib name 'OCIIntervalGetDaySecond';

  function OCIDateTimeToArray(hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; reftz:POCIInterval; outarray:Pub1;
             len:Pub4; fsprec:ub1):sword;cdecl;external ocilib name 'OCIDateTimeToArray';

  function OCIDateTimeFromArray(hndl:Pdvoid; err:POCIError; inarray:Pub1; len:ub4; _type:ub1;
             datetime:POCIDateTime; reftz:POCIInterval; fsprec:ub1):sword;cdecl;external ocilib name 'OCIDateTimeFromArray';

  function OCIDateTimeGetTimeZoneName(hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; buf:Pub1; buflen:Pub4):sword;cdecl;external ocilib name 'OCIDateTimeGetTimeZoneName';

  function OCIIntervalFromTZ(hndl:Pdvoid; err:POCIError; inpstring:Poratext; str_len:size_t; result:POCIInterval):sword;cdecl;external ocilib name 'OCIIntervalFromTZ';

  {----------------- End Datetime interface Extensions ----------------------- }
  {----------------- Connection Pooling prototypes --------------------------- }
  function OCIConnectionPoolCreate(envhp:POCIEnv; errhp:POCIError; poolhp:POCICPool; var poolName:POraText; poolNameLen:Psb4;
             dblink:POraText; dblinkLen:sb4; connMin:ub4; connMax:ub4; connIncr:ub4; 
             poolUserName:POraText; poolUserLen:sb4; poolPassword:POraText; poolPassLen:sb4; mode:ub4):sword;cdecl;external ocilib name 'OCIConnectionPoolCreate';

  function OCIConnectionPoolDestroy(poolhp:POCICPool; errhp:POCIError; mode:ub4):sword;cdecl;external ocilib name 'OCIConnectionPoolDestroy';

  {----------------- End Connection Pooling prototypes ----------------------- }
  {-------------------- Session Pooling prototypes --------------------------- }
  function OCISessionPoolCreate(envhp:POCIEnv; errhp:POCIError; spoolhp:POCISPool; var poolName:POraText; poolNameLen:Pub4;
             connStr:POraText; connStrLen:ub4; sessMin:ub4; sessMax:ub4; sessIncr:ub4; 
             userid:POraText; useridLen:ub4; password:POraText; passwordLen:ub4; mode:ub4):sword;cdecl;external ocilib name 'OCISessionPoolCreate';

  function OCISessionPoolDestroy(spoolhp:POCISPool; errhp:POCIError; mode:ub4):sword;cdecl;external ocilib name 'OCISessionPoolDestroy';

  function OCISessionGet(envhp:POCIEnv; errhp:POCIError; var svchp:POCISvcCtx; authhp:POCIAuthInfo; poolName:POraText;
             poolName_len:ub4; tagInfo:POraText; tagInfo_len:ub4; var retTagInfo:POraText; retTagInfo_len:Pub4;
             found:Pboolean; mode:ub4):sword;cdecl;external ocilib name 'OCISessionGet';

  function OCISessionRelease(svchp:POCISvcCtx; errhp:POCIError; tag:POraText; tag_len:ub4; mode:ub4):sword;cdecl;external ocilib name 'OCISessionRelease';

  {-------------------- End Session Pooling prototypes ----------------------- }
  { --------------------- OCI Application Context -------------------------- }
  function OCIAppCtxSet(sesshndl:pointer; nsptr:Pdvoid; nsptrlen:ub4; attrptr:Pdvoid; attrptrlen:ub4; 
             valueptr:Pdvoid; valueptrlen:ub4; errhp:POCIError; mode:ub4):sword;cdecl;external ocilib name 'OCIAppCtxSet';

  function OCIAppCtxClearAll(sesshndl:pointer; nsptr:Pdvoid; nsptrlen:ub4; errhp:POCIError; mode:ub4):sword;cdecl;external ocilib name 'OCIAppCtxClearAll';

  {-------------------------------- OCIPing ---------------------------------- }
  function OCIPing(svchp:POCISvcCtx; errhp:POCIError; mode:ub4):sword;cdecl;external ocilib name 'OCIPing';

  {----------------- Kerberos Authentication prototypes ---------------------- }
  function OCIKerbAttrSet(trgthndlp:POCISession; cred_use:ub4; ftgt_ticket:Pub1; ticket_len:ub4; session_key:Pub1; 
             skey_len:ub4; ftgt_keytype:ub2; ftgt_ticket_flags:ub4; ftgt_auth_time:sb4; ftgt_start_time:sb4; 
             ftgt_end_time:sb4; ftgt_renew_time:sb4; ftgt_client_principal:Ptext; ftgt_client_principal_len:ub4; ftgt_client_realm:Ptext; 
             ftgt_client_realm_len:ub4; errhp:POCIError):sword;cdecl;external ocilib name 'OCIKerbAttrSet';

  {------------------- End Kerberos Authentication prototypes ---------------- }
  {------------------- Database Startup/Shutdown prototypes ------------------ }
  function OCIDBStartup(svchp:POCISvcCtx; errhp:POCIError; admhp:POCIAdmin; mode:ub4; flags:ub4):sword;cdecl;external ocilib name 'OCIDBStartup';

  function OCIDBShutdown(svchp:POCISvcCtx; errhp:POCIError; admhp:POCIAdmin; mode:ub4):sword;cdecl;external ocilib name 'OCIDBShutdown';

  {------------------ End Database Startup/Shutdown prototypes --------------- }
  {----------------------- OCIClientVersion ------------------------------ }
  procedure OCIClientVersion(major_version:Psword; minor_version:Psword; update_num:Psword; patch_num:Psword; port_update_num:Psword);cdecl;external ocilib name 'OCIClientVersion';

  {----------------------- End OCIClientVersion -------------------------- }
  {----------------------- HA Event prototypes ------------------------------ }
  function OCIInitEventHandle(errhp:POCIError; event:POCIEvent; str:Ptext; size:ub4):sword;cdecl;external ocilib name 'OCIInitEventHandle';

  {----------------------- End HA Event prototypes -------------------------- }

{$ELSE}

var OCISubscriptionRegister : function (svchp:POCISvcCtx; var subscrhpp:POCISubscription; count:ub2; errhp:POCIError; mode:ub4):sword;cdecl;

   OCISubscriptionPost : function (svchp:POCISvcCtx; var subscrhpp:POCISubscription; count:ub2; errhp:POCIError; mode:ub4):sword;cdecl;

   OCISubscriptionUnRegister : function (svchp:POCISvcCtx; subscrhp:POCISubscription; errhp:POCIError; mode:ub4):sword;cdecl;

   OCISubscriptionDisable : function (subscrhp:POCISubscription; errhp:POCIError; mode:ub4):sword;cdecl;

   OCISubscriptionEnable : function (subscrhp:POCISubscription; errhp:POCIError; mode:ub4):sword;cdecl;

  {------------------- End OCI Publish/Subscribe Interfaces ------------------ }
  {----------------- Extensions to Datetime interfaces ----------------------- }
  {--------------------- Actual Prototypes ----------------------------------- }
   OCIDateTimeGetTime : function (hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; hr:Pub1; mm:Pub1;
             ss:Pub1; fsec:Pub4):sword;cdecl;

   OCIDateTimeGetDate : function (hndl:Pdvoid; err:POCIError; date:POCIDateTime; yr:Psb2; mnth:Pub1;
             dy:Pub1):sword;cdecl;

   OCIDateTimeGetTimeZoneOffset : function (hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; hr:Psb1; mm:Psb1):sword;cdecl;

   OCIDateTimeConstruct : function (hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; yr:sb2; mnth:ub1;
             dy:ub1; hr:ub1; mm:ub1; ss:ub1; fsec:ub4;
             timezone:POraText; timezone_length:size_t):sword;cdecl;

   OCIDateTimeSysTimeStamp : function (hndl:Pdvoid; err:POCIError; sys_date:POCIDateTime):sword;cdecl;

   OCIDateTimeAssign : function (hndl:Pdvoid; err:POCIError; from:POCIDateTime; cto:POCIDateTime):sword;cdecl;

   OCIDateTimeToText : function (hndl:Pdvoid; err:POCIError; date:POCIDateTime; fmt:POraText; fmt_length:ub1;
             fsprec:ub1; lang_name:POraText; lang_length:size_t; buf_size:Pub4; buf:POraText):sword;cdecl;

   OCIDateTimeFromText : function (hndl:Pdvoid; err:POCIError; date_str:POraText; dstr_length:size_t; fmt:POraText;
             fmt_length:ub1; lang_name:POraText; lang_length:size_t; date:POCIDateTime):sword;cdecl;

   OCIDateTimeCompare : function (hndl:Pdvoid; err:POCIError; date1:POCIDateTime; date2:POCIDateTime; result:Psword):sword;cdecl;

   OCIDateTimeCheck : function (hndl:Pdvoid; err:POCIError; date:POCIDateTime; valid:Pub4):sword;cdecl;

   OCIDateTimeConvert : function (hndl:Pdvoid; err:POCIError; indate:POCIDateTime; outdate:POCIDateTime):sword;cdecl;

   OCIDateTimeSubtract : function (hndl:Pdvoid; err:POCIError; indate1:POCIDateTime; indate2:POCIDateTime; inter:POCIInterval):sword;cdecl;

   OCIDateTimeIntervalAdd : function (hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; inter:POCIInterval; outdatetime:POCIDateTime):sword;cdecl;

   OCIDateTimeIntervalSub : function (hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; inter:POCIInterval; outdatetime:POCIDateTime):sword;cdecl;

   OCIIntervalSubtract : function (hndl:Pdvoid; err:POCIError; minuend:POCIInterval; subtrahend:POCIInterval; result:POCIInterval):sword;cdecl;

   OCIIntervalAdd : function (hndl:Pdvoid; err:POCIError; addend1:POCIInterval; addend2:POCIInterval; result:POCIInterval):sword;cdecl;

   OCIIntervalMultiply : function (hndl:Pdvoid; err:POCIError; inter:POCIInterval; nfactor:POCINumber; result:POCIInterval):sword;cdecl;

   OCIIntervalDivide : function (hndl:Pdvoid; err:POCIError; dividend:POCIInterval; divisor:POCINumber; result:POCIInterval):sword;cdecl;

   OCIIntervalCompare : function (hndl:Pdvoid; err:POCIError; inter1:POCIInterval; inter2:POCIInterval; result:Psword):sword;cdecl;

   OCIIntervalFromNumber : function (hndl:Pdvoid; err:POCIError; inter:POCIInterval; number:POCINumber):sword;cdecl;

   OCIIntervalFromText : function (hndl:Pdvoid; err:POCIError; inpstr:POraText; str_len:size_t; result:POCIInterval):sword;cdecl;

   OCIIntervalToText : function (hndl:Pdvoid; err:POCIError; inter:POCIInterval; lfprec:ub1; fsprec:ub1;
             buffer:POraText; buflen:size_t; resultlen:Psize_t):sword;cdecl;

   OCIIntervalToNumber : function (hndl:Pdvoid; err:POCIError; inter:POCIInterval; number:POCINumber):sword;cdecl;

   OCIIntervalCheck : function (hndl:Pdvoid; err:POCIError; interval:POCIInterval; valid:Pub4):sword;cdecl;

   OCIIntervalAssign : function (hndl:Pdvoid; err:POCIError; ininter:POCIInterval; outinter:POCIInterval):sword;cdecl;

   OCIIntervalSetYearMonth : function (hndl:Pdvoid; err:POCIError; yr:sb4; mnth:sb4; result:POCIInterval):sword;cdecl;

   OCIIntervalGetYearMonth : function (hndl:Pdvoid; err:POCIError; yr:Psb4; mnth:Psb4; result:POCIInterval):sword;cdecl;

   OCIIntervalSetDaySecond : function (hndl:Pdvoid; err:POCIError; dy:sb4; hr:sb4; mm:sb4;
             ss:sb4; fsec:sb4; result:POCIInterval):sword;cdecl;

   OCIIntervalGetDaySecond : function (hndl:Pdvoid; err:POCIError; dy:Psb4; hr:Psb4; mm:Psb4;
             ss:Psb4; fsec:Psb4; result:POCIInterval):sword;cdecl;

   OCIDateTimeToArray : function (hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; reftz:POCIInterval; outarray:Pub1;
             len:Pub4; fsprec:ub1):sword;cdecl;

   OCIDateTimeFromArray : function (hndl:Pdvoid; err:POCIError; inarray:Pub1; len:ub4; _type:ub1;
             datetime:POCIDateTime; reftz:POCIInterval; fsprec:ub1):sword;cdecl;

   OCIDateTimeGetTimeZoneName : function (hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; buf:Pub1; buflen:Pub4):sword;cdecl;

   OCIIntervalFromTZ : function (hndl:Pdvoid; err:POCIError; inpstring:Poratext; str_len:size_t; result:POCIInterval):sword;cdecl;

  {----------------- End Datetime interface Extensions ----------------------- }
  {----------------- Connection Pooling prototypes --------------------------- }
   OCIConnectionPoolCreate : function (envhp:POCIEnv; errhp:POCIError; poolhp:POCICPool; var poolName:POraText; poolNameLen:Psb4;
             dblink:POraText; dblinkLen:sb4; connMin:ub4; connMax:ub4; connIncr:ub4;
             poolUserName:POraText; poolUserLen:sb4; poolPassword:POraText; poolPassLen:sb4; mode:ub4):sword;cdecl;

   OCIConnectionPoolDestroy : function (poolhp:POCICPool; errhp:POCIError; mode:ub4):sword;cdecl;

  {----------------- End Connection Pooling prototypes ----------------------- }
  {-------------------- Session Pooling prototypes --------------------------- }
   OCISessionPoolCreate : function (envhp:POCIEnv; errhp:POCIError; spoolhp:POCISPool; var poolName:POraText; poolNameLen:Pub4;
             connStr:POraText; connStrLen:ub4; sessMin:ub4; sessMax:ub4; sessIncr:ub4;
             userid:POraText; useridLen:ub4; password:POraText; passwordLen:ub4; mode:ub4):sword;cdecl;

   OCISessionPoolDestroy : function (spoolhp:POCISPool; errhp:POCIError; mode:ub4):sword;cdecl;

   OCISessionGet : function (envhp:POCIEnv; errhp:POCIError; var svchp:POCISvcCtx; authhp:POCIAuthInfo; poolName:POraText;
             poolName_len:ub4; tagInfo:POraText; tagInfo_len:ub4; var retTagInfo:POraText; retTagInfo_len:Pub4;
             found:Pboolean; mode:ub4):sword;cdecl;

   OCISessionRelease : function (svchp:POCISvcCtx; errhp:POCIError; tag:POraText; tag_len:ub4; mode:ub4):sword;cdecl;

  {-------------------- End Session Pooling prototypes ----------------------- }
  { --------------------- OCI Application Context -------------------------- }
   OCIAppCtxSet : function (sesshndl:pointer; nsptr:Pdvoid; nsptrlen:ub4; attrptr:Pdvoid; attrptrlen:ub4;
             valueptr:Pdvoid; valueptrlen:ub4; errhp:POCIError; mode:ub4):sword;cdecl;

   OCIAppCtxClearAll : function (sesshndl:pointer; nsptr:Pdvoid; nsptrlen:ub4; errhp:POCIError; mode:ub4):sword;cdecl;

  {-------------------------------- OCIPing ---------------------------------- }
   OCIPing : function (svchp:POCISvcCtx; errhp:POCIError; mode:ub4):sword;cdecl;

  {----------------- Kerberos Authentication prototypes ---------------------- }
   OCIKerbAttrSet : function (trgthndlp:POCISession; cred_use:ub4; ftgt_ticket:Pub1; ticket_len:ub4; session_key:Pub1;
             skey_len:ub4; ftgt_keytype:ub2; ftgt_ticket_flags:ub4; ftgt_auth_time:sb4; ftgt_start_time:sb4;
             ftgt_end_time:sb4; ftgt_renew_time:sb4; ftgt_client_principal:Ptext; ftgt_client_principal_len:ub4; ftgt_client_realm:Ptext;
             ftgt_client_realm_len:ub4; errhp:POCIError):sword;cdecl;

  {------------------- End Kerberos Authentication prototypes ---------------- }
  {------------------- Database Startup/Shutdown prototypes ------------------ }
   OCIDBStartup : function (svchp:POCISvcCtx; errhp:POCIError; admhp:POCIAdmin; mode:ub4; flags:ub4):sword;cdecl;

   OCIDBShutdown : function (svchp:POCISvcCtx; errhp:POCIError; admhp:POCIAdmin; mode:ub4):sword;cdecl;

  {------------------ End Database Startup/Shutdown prototypes --------------- }
  {----------------------- OCIClientVersion ------------------------------ }
   OCIClientVersion : procedure (major_version:Psword; minor_version:Psword; update_num:Psword; patch_num:Psword; port_update_num:Psword);cdecl;

  {----------------------- End OCIClientVersion -------------------------- }
  {----------------------- HA Event prototypes ------------------------------ }
   OCIInitEventHandle : function (errhp:POCIError; event:POCIEvent; str:Ptext; size:ub4):sword;cdecl;

  {----------------------- End HA Event prototypes -------------------------- }


{$ENDIF}
  {---------------------------------------------------------------------------
                            PRIVATE FUNCTIONS
    --------------------------------------------------------------------------- }
  { the following functions are depracated and should not be used  }
{$ifdef NEVER}

  function OCIStmtBindByPos(stmtp:POCIStmt; bindp:POCIBind; errhp:POCIError; position:ub4; valuep:Pdvoid; 
             value_sz:sb4; dty:ub2; indp:Pdvoid; alenp:Pub2; rcodep:Pub2; 
             maxarr_len:ub4; curelep:Pub4; mode:ub4):sword;cdecl;external ocilib name 'OCIStmtBindByPos';

(* Const before type ignored *)
  function OCIStmtBindByName(stmtp:POCIStmt; bindp:POCIBind; errhp:POCIError; placeholder:POraText; placeh_len:sb4; 
             valuep:Pdvoid; value_sz:sb4; dty:ub2; indp:Pdvoid; alenp:Pub2; 
             rcodep:Pub2; maxarr_len:ub4; curelep:Pub4; mode:ub4):sword;cdecl;external ocilib name 'OCIStmtBindByName';

  function ocidefn(stmtp:POCIStmt; defnp:POCIDefine; errhp:POCIError; position:ub4; valuep:Pdvoid; 
             value_sz:sb4; dty:ub2; indp:Pdvoid; rlenp:Pub2; rcodep:Pub2; 
             mode:ub4):sword;cdecl;external ocilib name 'ocidefn';

{$endif}
  { NEVER  }
{$endif}
  { OCIAP_ORACLE  }