File: prguid24.htm

package info (click to toggle)
solid-doc 2.2-1
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 3,436 kB
  • ctags: 11,371
  • sloc: makefile: 58; sh: 2
file content (3849 lines) | stat: -rw-r--r-- 138,622 bytes parent folder | download | duplicates (2)
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
<HTML>
<HEAD>
<TITLE>prguide.htm</TITLE>
<LINK REL="ToC" HREF="httoc.htm">
<LINK REL="Index" HREF="htindex.htm">
<LINK REL="Next" HREF="prguid25.htm">
<LINK REL="Previous" HREF="prguid23.htm"></HEAD>
<BODY BGCOLOR="#FFFFFF">
<P ALIGN=CENTER>
<A HREF="prguid23.htm" TARGET="_self"><IMG SRC="graprev.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Previous Page"></A>
<A HREF="httoc.htm" TARGET="_self"><IMG SRC="gratoc.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="TOC"></A>
<A HREF="htindex.htm" TARGET="_self"><IMG SRC="graindex.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Index"></A>
<A HREF="prguid25.htm" TARGET="_self"><IMG SRC="granext.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Next Page"></A>
<HR ALIGN=CENTER>
<P>
<UL>
<UL>
<LI>
<A HREF="#E74E11" >SQLSetScrollOptions (ODBC 1.0, Level 2)</A>
<UL>
<LI>
<A HREF="#E11E326" >Syntax</A>
<LI>
<A HREF="#E11E327" >Returns</A>
<LI>
<A HREF="#E11E328" >Diagnostics</A>
<LI>
<A HREF="#E11E329" >Comments</A>
<LI>
<A HREF="#E11E330" >Related Functions</A></UL>
<LI>
<A HREF="#E10E104" >SQLSetStmtOption (ODBC 1.0, Level 1)</A>
<UL>
<LI>
<A HREF="#E11E331" >Syntax</A>
<LI>
<A HREF="#E11E332" >Returns</A>
<LI>
<A HREF="#E11E333" >Diagnostics</A>
<LI>
<A HREF="#E11E334" >Comments</A>
<LI>
<A HREF="#E11E335" >Code Example</A>
<LI>
<A HREF="#E11E336" >Related Functions</A></UL>
<LI>
<A HREF="#E10E105" >SQLSpecialColumns (ODBC 1.0, Level 1)</A>
<UL>
<LI>
<A HREF="#E11E337" >Syntax</A>
<LI>
<A HREF="#E11E338" >Returns</A>
<LI>
<A HREF="#E11E339" >Diagnostics</A>
<LI>
<A HREF="#E11E340" >Comments</A>
<LI>
<A HREF="#E11E341" >Code Example</A>
<LI>
<A HREF="#E11E342" >Related Functions</A></UL>
<LI>
<A HREF="#E10E106" >SQLStatistics (ODBC 1.0, Level 1)</A>
<UL>
<LI>
<A HREF="#E11E343" >Syntax</A>
<LI>
<A HREF="#E11E344" >Returns</A>
<LI>
<A HREF="#E11E345" >Diagnostics</A>
<LI>
<A HREF="#E11E346" >Comments</A>
<LI>
<A HREF="#E11E347" >Code Example</A>
<LI>
<A HREF="#E11E348" >Related Functions</A></UL>
<LI>
<A HREF="#E10E107" >SQLTablePrivileges (ODBC 1.0, Level 2)</A>
<UL>
<LI>
<A HREF="#E11E349" >Syntax</A>
<LI>
<A HREF="#E11E350" >Returns</A>
<LI>
<A HREF="#E11E351" >Diagnostics</A>
<LI>
<A HREF="#E11E352" >Comments</A>
<LI>
<A HREF="#E11E353" >Code Example</A>
<LI>
<A HREF="#E11E354" >Related Functions</A></UL>
<LI>
<A HREF="#E10E108" >SQLTables (ODBC 1.0, Level 1)</A>
<UL>
<LI>
<A HREF="#E11E355" >Syntax</A>
<LI>
<A HREF="#E11E356" >Returns</A>
<LI>
<A HREF="#E11E357" >Diagnostics</A>
<LI>
<A HREF="#E11E358" >Comments</A>
<LI>
<A HREF="#E11E359" >Code Example</A>
<LI>
<A HREF="#E11E360" >Related Functions</A></UL>
<LI>
<A HREF="#E10E109" >SQLTransact (ODBC 1.0, Core)</A>
<UL>
<LI>
<A HREF="#E11E361" >Syntax</A>
<LI>
<A HREF="#E11E362" >Returns</A>
<LI>
<A HREF="#E11E363" >Diagnostics</A>
<LI>
<A HREF="#E11E364" >Comments</A>
<LI>
<A HREF="#E11E365" >Code Example</A>
<LI>
<A HREF="#E11E366" >Related Functions</A></UL></UL></UL>
<HR ALIGN=CENTER>
<A NAME="E74E11"></A>
<H2>
<FONT FACE="Arial"><B>SQLSetScrollOptions (ODBC 1.0, Level 2)</B><A NAME="I2"></A><A NAME="I3"></A></FONT></H2>
<BLOCKQUOTE>
<P><B>SQLSetScrollOptions</B> sets options that control the behavior of cursors associated with an <I>hstmt</I>. <B>SQLSetScrollOptions</B> allows the application to specify the type of cursor behavior desired in three areas: concurrency control, sensitivity to changes made by other transactions, and rowset size.<A NAME="I4"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<NOTE>Note In ODBC 2.0, <B>SQLSetScrollOptions</B> has been superceded by the SQL_CURSOR_TYPE, SQL_CONCURRENCY, SQL_KEYSET_SIZE, and SQL_ROWSET_SIZE statement options. ODBC 2.0 drivers must support this function for backwards compatibility; ODBC 2.0 applications should only call this function in ODBC 1.0 drivers.</NOTE>
<HR ALIGN=CENTER>
</BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<NOTE>If an application calls <B>SQLSetScrollOptions</B>, a driver must be able to return the values of the aforementioned statement options with <B>SQLGetStmtOption</B>. For more information, see <B>SQLSetStmtOption</B>.</NOTE>
<HR ALIGN=CENTER>
</BLOCKQUOTE>
<A NAME="E11E326"></A>
<H3>
<FONT FACE="Arial">Syntax</FONT></H3>
<BLOCKQUOTE>
<P>RETCODE <B>SQLSetScrollOptions</B>(<I>hstmt</I>, <I>fConcurrency</I>, <I>crowKeyset</I>, <I>crowRowset</I>)<A NAME="I5"></A><A NAME="I6"></A><A NAME="I7"></A><A NAME="I8"></A><A NAME="I9"></A><A NAME="I10"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The <B>SQLSetScrollOptions</B> function accepts the following arguments:
</BLOCKQUOTE>
<TABLE WIDTH=800 >
<TR>
<TD WIDTH=73 VALIGN=top >
<BLOCKQUOTE>
<P><B>Type</B>
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1713"></A>
<P>Argument
</TD><TD WIDTH=66 VALIGN=top >
<A NAME="E7E1713"></A>
<P>Use
</TD><TD WIDTH=220 VALIGN=top >
<A NAME="E7E1713"></A>
<P>Description</TD>
</TR>
<TR>
<TD WIDTH=73 VALIGN=top >
<BLOCKQUOTE>
<P>HSTMT
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1714"></A>
<P><I>hstmt</I>
</TD><TD WIDTH=66 VALIGN=top >
<A NAME="E7E1714"></A>
<P>Input
</TD><TD WIDTH=220 VALIGN=top >
<A NAME="E7E1714"></A>
<P>Statement handle. </TD>
</TR>
<TR>
<TD WIDTH=73 VALIGN=top >
<BLOCKQUOTE>
<P>UWORD
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1715"></A>
<P><I>fConcurrency</I>
</TD><TD WIDTH=66 VALIGN=top >
<A NAME="E7E1715"></A>
<P>Input
</TD><TD WIDTH=220 VALIGN=top >
<A NAME="E7E1715"></A>
<P>Specifies concurrency control for the cursor and must be one of the following values:</TD>
</TR>
<TR>
<TD WIDTH=73 VALIGN=top ><BR></TD>
<TD WIDTH=93 VALIGN=top ><BR></TD>
<TD WIDTH=66 VALIGN=top ><BR></TD>
<TD WIDTH=220 VALIGN=top >
<BLOCKQUOTE>
<P>SQL_CONCUR_READ_ONLY: Cursor is read-only. No updates are allowed.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=73 VALIGN=top ><BR></TD>
<TD WIDTH=93 VALIGN=top ><BR></TD>
<TD WIDTH=66 VALIGN=top ><BR></TD>
<TD WIDTH=220 VALIGN=top >
<BLOCKQUOTE>
<P>SQL_CONCUR_LOCK: Cursor uses the lowest level of locking sufficient to ensure that the row can be updated.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=73 VALIGN=top ><BR></TD>
<TD WIDTH=93 VALIGN=top ><BR></TD>
<TD WIDTH=66 VALIGN=top ><BR></TD>
<TD WIDTH=220 VALIGN=top >
<BLOCKQUOTE>
<P>SQL_CONCUR_ROWVER: Cursor uses optimistic concurrency control, comparing row versions, such as SQLBase ROWID or Sybase TIMESTAMP.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=73 VALIGN=top ><BR></TD>
<TD WIDTH=93 VALIGN=top ><BR></TD>
<TD WIDTH=66 VALIGN=top ><BR></TD>
<TD WIDTH=220 VALIGN=top >
<BLOCKQUOTE>
<P>SQL_CONCUR_VALUES: Cursor uses optimistic concurrency control, comparing values.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=73 VALIGN=top >
<BLOCKQUOTE>
<P>SDWORD<A NAME="I11"></A><A NAME="I12"></A>
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P><I>crowKeyset</I>
</BLOCKQUOTE></TD>
<TD WIDTH=66 VALIGN=top >
<A NAME="E7E1716"></A>
<P>Input
</TD><TD WIDTH=220 VALIGN=top >
<A NAME="E7E1716"></A>
<P>Number of rows for which to buffer keys. This value must be greater than or equal to <I>crowRowset</I> or one of the following values:
<BLOCKQUOTE>
<P>SQL_SCROLL_FORWARD_ONLY: The cursor only scrolls forward.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>SQL_SCROLL_STATIC: The data in the result set is static.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>SQL_SCROLL_KEYSET_DRIVEN: The driver saves and uses the keys for every row in the result set.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>SQL_SCROLL_DYNAMIC: The driver sets <I>crowKeyset</I> to the value of <I>crowRowset</I>.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If <I>crowKeyset</I> is a value greater than <I>crowRowset</I>, the value defines the number of rows in the keyset that are to be buffered by the driver. This reflects a mixed scrollable cursor; the cursor is keyset driven within the keyset and dynamic outside of the keyset.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=73 VALIGN=top >
<BLOCKQUOTE>
<P>UWORD
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1717"></A>
<P><I>crowRowset</I>
</TD><TD WIDTH=66 VALIGN=top >
<A NAME="E7E1717"></A>
<P>Input
</TD><TD WIDTH=220 VALIGN=top >
<A NAME="E7E1717"></A>
<P>Number of rows in a rowset. <I>crowRowset</I> defines the number of rows fetched by each call to <B>SQLExtendedFetch</B>; the number of rows that the application buffers.</TD></TR></TABLE>
<A NAME="E11E327"></A>
<H3>
<FONT FACE="Arial">Returns<A NAME="I13"></A></FONT></H3>
<BLOCKQUOTE>
<P>SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.
</BLOCKQUOTE>
<A NAME="E11E328"></A>
<H3>
<FONT FACE="Arial">Diagnostics<A NAME="I14"></A></FONT></H3>
<BLOCKQUOTE>
<P>When <B>SQLSetScrollOptions</B> returns SQL_ERROR or SQL_SUCCESS_WITH_INFO, an associated SQLSTATE value may be obtained by calling <B>SQLError</B>. The following table lists the SQLSTATE values commonly returned by <B>SQLSetScrollOptions </B>and explains each one in the context of this function; the notation &quot;(DM)&quot; precedes the descriptions of SQLSTATEs returned by the Driver Manager. The return code associated with each SQLSTATE value is SQL_ERROR, unless noted otherwise.
</BLOCKQUOTE>
<TABLE WIDTH=800 >
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P><B>SQLSTATE</B>
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1718"></A>
<P>Error
</TD><TD WIDTH=273 VALIGN=top >
<A NAME="E7E1718"></A>
<P>Description</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>01000
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1719"></A>
<P>General warning
</TD><TD WIDTH=273 VALIGN=top >
<A NAME="E7E1719"></A>
<P>Driver-specific informational message. (Function returns SQL_SUCCESS_WITH_INFO.)</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>IM001
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1720"></A>
<P>Driver does not support this function
</TD><TD WIDTH=273 VALIGN=top >
<A NAME="E7E1720"></A>
<P>(DM) The driver associated with the <I>hstmt</I> does not support the function.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>S1000
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1721"></A>
<P>General error
</TD><TD WIDTH=273 VALIGN=top >
<A NAME="E7E1721"></A>
<P>An error occurred for which there was no specific SQLSTATE and for which no implementation-specific SQLSTATE was defined. The error message returned by <B>SQLError</B> in the argument <I>szErrorMsg</I> describes the error and its cause.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>S1001
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1722"></A>
<P>Memory allocation failure
</TD><TD WIDTH=273 VALIGN=top >
<A NAME="E7E1722"></A>
<P>The driver was unable to allocate memory required to support execution or completion of the function.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>S1010
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1723"></A>
<P>Function sequence error
</TD><TD WIDTH=273 VALIGN=top >
<A NAME="E7E1723"></A>
<P>(DM) The specified <I>hstmt</I> was in a prepared or executed state. The function must be called before calling <B>SQLPrepare </B>or <B>SQLExecDirect</B>.
<BLOCKQUOTE>
<P>(DM) An asynchronously executing function was called for the <I>hstmt</I> and was still executing when this function was called.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>(DM) <B>SQLExecute</B>, <B>SQLExecDirect</B>, or <B>SQLSetPos</B> was called for the <I>hstmt</I> and returned SQL_NEED_DATA. This function was called before data was sent for all data-at-execution parameters or columns.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>S1107
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1724"></A>
<P>Row value out of range
</TD><TD WIDTH=273 VALIGN=top >
<A NAME="E7E1724"></A>
<P>(DM) The value specified for the argument <I>crowKeyset</I> was less than 1, but was not equal to SQL_SCROLL_FORWARD_ONLY, SQL_SCROLL_STATIC, SQL_SCROLL_KEYSET_DRIVEN, or SQL_SCROLL_DYNAMIC. </TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top ><BR></TD>
<TD WIDTH=93 VALIGN=top ><BR></TD>
<TD WIDTH=273 VALIGN=top >
<BLOCKQUOTE>
<P>(DM) The value specified for the argument <I>crowKeyset</I> is greater than 0, but less than <I>crowRowset</I>.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=86 VALIGN=top ><BR></TD>
<TD WIDTH=93 VALIGN=top ><BR></TD>
<TD WIDTH=273 VALIGN=top >
<BLOCKQUOTE>
<P>(DM) The value specified for the argument <I>crowRowset</I> was 0.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>S1108
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1725"></A>
<P>Concurrency option out of range
</TD><TD WIDTH=273 VALIGN=top >
<A NAME="E7E1725"></A>
<P>(DM) The value specified for the argument <I>fConcurrency</I> was not equal to SQL_CONCUR_READ_ONLY, SQL_CONCUR_LOCK, SQL_CONCUR_ROWVER, or SQL_CONCUR_VALUES.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>S1C00
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1726"></A>
<P>Driver not capable
</TD><TD WIDTH=273 VALIGN=top >
<A NAME="E7E1726"></A>
<P>The driver or data source does not support the concurrency control option specified in the argument <I>fConcurrency</I>.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top ><BR></TD>
<TD WIDTH=93 VALIGN=top ><BR></TD>
<TD WIDTH=273 VALIGN=top >
<BLOCKQUOTE>
<P>The driver does not support the cursor model specified in the argument <I>crowKeyset</I>.</TD></TR></BLOCKQUOTE></TABLE>
<A NAME="E11E329"></A>
<H3>
<FONT FACE="Arial">Comments<A NAME="I15"></A></FONT></H3>
<BLOCKQUOTE>
<P>If an application calls <B>SQLSetScrollOptions</B> for an <I>hstmt</I>, it must do so before it calls <B>SQLPrepare</B> or <B>SQLExecDirect</B> or creating a result set with a catalog function.<A NAME="I16"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The application must specify a buffer in a call to <B>SQLBindCol</B> that is large enough to hold the number of rows specified in <I>crowRowset</I>.<A NAME="I17"></A><A NAME="I18"></A><A NAME="I19"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If the application does not call <B>SQLSetScrollOptions</B>, <I>crowRowset</I> has a default value of 1, <I>crowKeyset</I> has a default value of SQL_SCROLL_FORWARD_ONLY, and <I>fConcurrency</I> equals SQL_CONCUR_READ_ONLY.<A NAME="I20"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>For more information concerning scrollable cursors, see &quot;Using Block and Scrollable Cursors&quot; in Chapter 7, &quot;Retrieving Results.&quot;
</BLOCKQUOTE>
<A NAME="E11E330"></A>
<H3>
<FONT FACE="Arial">Related Functions</FONT></H3>

<TABLE WIDTH=800 >
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P><B>For information about</B>
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1727"></A>
<P>See</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Assigning storage for a column in a result set
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1728"></A>
<P><B>SQLBindCol</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Fetching a block of data or scrolling through a result set
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1729"></A>
<P><B>SQLExtendedFetch</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Positioning the cursor in a rowset
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1730"></A>
<P><B>SQLSetPos</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Setting a statement option
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1731"></A>
<P><B>SQLSetStmtOption</B></TD></TR></TABLE><A NAME="E7E1731"></A>
<A NAME="E10E104"></A>
<H2>
<FONT FACE="Arial"><B>SQLSetStmtOption (ODBC 1.0, Level 1)</B><A NAME="I21"></A></FONT></H2>
<BLOCKQUOTE>
<P><B>SQLSetStmtOption</B> sets options related to an <I>hstmt</I>. To set an option for all statements associated with a specific <I>hdbc</I>, an application can call <B>SQLSetConnectOption</B>.
</BLOCKQUOTE>
<A NAME="E11E331"></A>
<H3>
<FONT FACE="Arial">Syntax</FONT></H3>
<BLOCKQUOTE>
<P>RETCODE <B>SQLSetStmtOption</B>(<I>hstmt</I>, <I>fOption</I>, <I>vParam</I>)<A NAME="I22"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The <B>SQLSetStmtOption</B> function accepts the following arguments:
</BLOCKQUOTE>
<TABLE WIDTH=800 >
<TR>
<TD WIDTH=80 VALIGN=top >
<BLOCKQUOTE>
<P><B>Type</B>
</BLOCKQUOTE></TD>
<TD WIDTH=86 VALIGN=top >
<A NAME="E7E1732"></A>
<P>Argument
</TD><TD WIDTH=73 VALIGN=top >
<A NAME="E7E1732"></A>
<P>Use
</TD><TD WIDTH=213 VALIGN=top >
<A NAME="E7E1732"></A>
<P>Description</TD>
</TR>
<TR>
<TD WIDTH=80 VALIGN=top >
<BLOCKQUOTE>
<P>HSTMT
</BLOCKQUOTE></TD>
<TD WIDTH=86 VALIGN=top >
<A NAME="E7E1733"></A>
<P><I>hstmt</I>
</TD><TD WIDTH=73 VALIGN=top >
<A NAME="E7E1733"></A>
<P>Input
</TD><TD WIDTH=213 VALIGN=top >
<A NAME="E7E1733"></A>
<P>Statement handle.</TD>
</TR>
<TR>
<TD WIDTH=80 VALIGN=top >
<BLOCKQUOTE>
<P>UWORD
</BLOCKQUOTE></TD>
<TD WIDTH=86 VALIGN=top >
<A NAME="E7E1734"></A>
<P><I>fOption</I>
</TD><TD WIDTH=73 VALIGN=top >
<A NAME="E7E1734"></A>
<P>Input
</TD><TD WIDTH=213 VALIGN=top >
<A NAME="E7E1734"></A>
<P>Option to set, listed in &quot;Comments.&quot;</TD>
</TR>
<TR>
<TD WIDTH=80 VALIGN=top >
<BLOCKQUOTE>
<P>UDWORD
</BLOCKQUOTE></TD>
<TD WIDTH=86 VALIGN=top >
<A NAME="E7E1735"></A>
<P><I>vParam</I>
</TD><TD WIDTH=73 VALIGN=top >
<A NAME="E7E1735"></A>
<P>Input
</TD><TD WIDTH=213 VALIGN=top >
<A NAME="E7E1735"></A>
<P>Value associated with <I>fOption</I>. Depending on the value of <I>fOption</I>, <I>vParam</I> will be a 32-bit integer value or point to a null-terminated character string.</TD></TR></TABLE>
<A NAME="E11E332"></A>
<H3>
<FONT FACE="Arial">Returns<A NAME="I23"></A></FONT></H3>
<BLOCKQUOTE>
<P>SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.
</BLOCKQUOTE>
<A NAME="E11E333"></A>
<H3>
<FONT FACE="Arial">Diagnostics<A NAME="I24"></A></FONT></H3>
<BLOCKQUOTE>
<P>When <B>SQLSetStmtOption</B> returns SQL_ERROR or SQL_SUCCESS_WITH_INFO, an associated SQLSTATE value may be obtained by calling <B>SQLError</B>. The following table lists the SQLSTATE values commonly returned by <B>SQLSetStmtOption </B>and explains each one in the context of this function; the notation &quot;(DM)&quot; precedes the descriptions of SQLSTATEs returned by the Driver Manager. The return code associated with each SQLSTATE value is SQL_ERROR, unless noted otherwise.
</BLOCKQUOTE>
<TABLE WIDTH=800 >
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P><B>SQLSTATE</B>
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E1736"></A>
<P>Error
</TD><TD WIDTH=240 VALIGN=top >
<A NAME="E7E1736"></A>
<P>Description</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>01000
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E1737"></A>
<P>General warning
</TD><TD WIDTH=240 VALIGN=top >
<A NAME="E7E1737"></A>
<P>Driver-specific informational message. (Function returns SQL_SUCCESS_WITH_INFO.)</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>01S02
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E1738"></A>
<P>Option value changed
</TD><TD WIDTH=240 VALIGN=top >
<A NAME="E7E1738"></A>
<P>The driver did not support the specified value of the <I>vParam</I> argument and substituted a similar value. (Function returns SQL_SUCCESS_WITH_INFO.)</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>08S01
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E1739"></A>
<P>Communication link failure
</TD><TD WIDTH=240 VALIGN=top >
<A NAME="E7E1739"></A>
<P>The communication link between the driver and the data source to which the driver was connected failed before the function completed processing.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>24000
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E1740"></A>
<P>Invalid cursor state
</TD><TD WIDTH=240 VALIGN=top >
<A NAME="E7E1740"></A>
<P>The <I>fOption</I> was SQL_CONCURRENCY, SQL_CURSOR_TYPE, SQL_SIMULATE_CURSOR, or SQL_USE_BOOKMARKS and the cursor was open.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>IM001
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E1741"></A>
<P>Driver does not support this function
</TD><TD WIDTH=240 VALIGN=top >
<A NAME="E7E1741"></A>
<P>(DM) The driver associated with the <I>hstmt</I> does not support the function.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1000
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E1742"></A>
<P>General error
</TD><TD WIDTH=240 VALIGN=top >
<A NAME="E7E1742"></A>
<P>An error occurred for which there was no specific SQLSTATE and for which no implementation-specific SQLSTATE was defined. The error message returned by <B>SQLError</B> in the argument <I>szErrorMsg</I> describes the error and its cause.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1001
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E1743"></A>
<P>Memory allocation failure
</TD><TD WIDTH=240 VALIGN=top >
<A NAME="E7E1743"></A>
<P>The driver was unable to allocate memory required to support execution or completion of the function.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1009
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E1744"></A>
<P>Invalid argument value
</TD><TD WIDTH=240 VALIGN=top >
<A NAME="E7E1744"></A>
<P>Given the specified <I>fOption</I> value, an invalid value was specified for the argument <I>vParam</I>. (The Driver Manager returns this SQLSTATE only for statement options that accept a discrete set of values, such as SQL_ASYNC_ENABLE. For all other statement options, the driver must verify the value of the argument <I>vParam</I>.)</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1010
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E1745"></A>
<P>Function sequence error
</TD><TD WIDTH=240 VALIGN=top >
<A NAME="E7E1745"></A>
<P>(DM) An asynchronously executing function was called for the <I>hstmt</I> and was still executing when this function was called.
<BLOCKQUOTE>
<P>(DM) <B>SQLExecute</B>, <B>SQLExecDirect</B>, or <B>SQLSetPos</B> was called for the <I>hstmt</I> and returned SQL_NEED_DATA. This function was called before data was sent for all data-at-execution parameters or columns.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1011
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E1746"></A>
<P>Operation invalid at this time
</TD><TD WIDTH=240 VALIGN=top >
<A NAME="E7E1746"></A>
<P>The <I>fOption</I> was SQL_CONCURRENCY, SQL_CURSOR_TYPE, SQL_SIMULATE_CURSOR, or SQL_USE_BOOKMARKS and the statement was prepared.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1092
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E1747"></A>
<P>Option type out of range
</TD><TD WIDTH=240 VALIGN=top >
<A NAME="E7E1747"></A>
<P>(DM) The value specified for the argument <I>fOption</I> was in the block of numbers reserved for ODBC connection and statement options, but was not valid for the version of ODBC supported by the driver.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1C00
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E1748"></A>
<P>Driver not capable
</TD><TD WIDTH=240 VALIGN=top >
<A NAME="E7E1748"></A>
<P>The value specified for the argument <I>fOption</I> was a valid ODBC statement option for the version of ODBC supported by the driver, but was not supported by the driver.
<BLOCKQUOTE>
<P>The value specified for the argument <I>fOption</I> was in the block of numbers reserved for driver-specific connection and statement options, but was not supported by the driver.</TD></TR></BLOCKQUOTE></TABLE>
<A NAME="E11E334"></A>
<H3>
<FONT FACE="Arial">Comments<A NAME="I25"></A><A NAME="I26"></A><A NAME="I27"></A></FONT></H3>
<BLOCKQUOTE>
<P>Statement options for an <I>hstmt</I> remain in effect until they are changed by another call to <B>SQLSetStmtOption</B> or the <I>hstmt</I> is dropped by calling <B>SQLFreeStmt</B> with the SQL_DROP option. Calling <B>SQLFreeStmt</B> with the SQL_CLOSE, SQL_UNBIND, or SQL_RESET_PARAMS options does not reset statement options.<A NAME="I28"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>Some statement options support substitution of a similar value if the data source does not support the specified value of <I>vParam</I>. In such cases, the driver returns SQL_SUCCESS_WITH_INFO and SQLSTATE 01S02 (Option value changed). For example, if <I>fOption</I> is SQL_CONCURRENCY, <I>vParam</I> is SQL_CONCUR_ROWVER, and the data source does not support this, the driver substitutes SQL_CONCUR_VALUES. To determine the substituted value, an application calls <B>SQLGetStmtOption</B>.<A NAME="I29"></A><A NAME="I30"></A><A NAME="I31"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The currently defined options and the version of ODBC in which they were introduced are shown below; it is expected that more will be defined to take advantage of different data sources. Options from 0 to 999 are reserved by ODBC; driver developers must reserve values greater than or equal to SQL_CONNECT_OPT_DRVR_START for driver-specific use.<A NAME="I32"></A><A NAME="I33"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The format of information set with <I>vParam</I> depends on the specified <I>fOption</I>. <B>SQLSetStmtOption</B> accepts option information in one of two different formats: a null-terminated character string or a 32-bit integer value. The format of each is noted in the option&#146;s description. This format applies to the information returned for each option in <B>SQLGetStmtOption</B>. Character strings pointed to  by the <I>vParam</I> argument of <B>SQLSetStmtOption</B> have a maximum length of SQL_MAX_OPTION_STRING_LENGTH bytes (excluding the null termination byte).
</BLOCKQUOTE>
<TABLE WIDTH=800 >
<TR>
<TD WIDTH=140 VALIGN=top >
<BLOCKQUOTE>
<P><B>fOption</B>
</BLOCKQUOTE></TD>
<TD COLSPAN=2 WIDTH=313 VALIGN=top >
<A NAME="E7E1749"></A>
<P>vParam Contents
<A NAME="I34"></A></TD>
</TR>
<TR>
<TD WIDTH=140 VALIGN=top >
<BLOCKQUOTE>
<P>SQL_ASYNC_ENABLE
<BR>(ODBC 1.0)
</BLOCKQUOTE></TD>
<TD COLSPAN=2 WIDTH=313 VALIGN=top >
<A NAME="E7E1750"></A>
<P>A 32-bit integer value that specifies whether a function called with the specified hstmt is executed asynchronously:
<BLOCKQUOTE>
<P>SQL_ASYNC_ENABLE_OFF = Off (the default)
<BR>SQL_ASYNC_ENABLE_ON = On
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>Once a function has been called asynchronously, no other functions can be called on the hstmt or the hdbc associated with the hstmt except for the original function, <B>SQLAllocStmt</B>, <B>SQLCancel</B>, or <B>SQLGetFunctions</B>, until the original function returns a code other than SQL_STILL_EXECUTING. Any other function called on the hstmt returns SQL_ERROR with an SQLSTATE of S1010 (Function sequence error). Functions can be called on other hstmts. For more information, see &quot;Executing Functions Asynchronously&quot; in Chapter 6.
</BLOCKQUOTE></TD>
</TR>
<TR>
<TD WIDTH=140 VALIGN=top ><BR></TD>
<TD COLSPAN=2 WIDTH=313 VALIGN=top >
<BLOCKQUOTE>
<P>The following functions can be executed asynchronously:
</BLOCKQUOTE></TD>
</TR>
<TR>
<TD WIDTH=140 VALIGN=top ><BR></TD>
<TD WIDTH=156 VALIGN=top >
<BLOCKQUOTE>
<P><B>SQLColAttributes</B>
<BR><B>SQLColumnPrivileges</B>
<BR><B>SQLColumns</B>
<BR><B>SQLDescribeCol</B>
<BR><B>SQLDescribeParam</B>
<BR><B>SQLExecDirect</B>
<BR><B>SQLExecute</B>
<BR><B>SQLExtendedFetch</B>
<BR><B>SQLFetch</B>
<BR><B>SQLForeignKeys</B>
<BR><B>SQLGetData</B>
<BR><B>SQLGetTypeInfo</B>
<BR><B>SQLMoreResults</B>
<BR>
<BR>
</BLOCKQUOTE></TD>
<TD WIDTH=156 VALIGN=top >
<BLOCKQUOTE>
<P><B>SQLNumParams</B>
<BR><B>SQLNumResultCols</B>
<BR><B>SQLParamData</B>
<BR><B>SQLPrepare</B>
<BR><B>SQLPrimaryKeys</B>
<BR><B>SQLProcedureColumns</B>
<BR><B>SQLProcedures</B>
<BR><B>SQLPutData</B>
<BR><B>SQLSetPos</B>
<BR><B>SQLSpecialColumns</B>
<BR><B>SQLStatistics</B>
<BR><B>SQLTablePrivileges</B>
<BR><B>SQLTables</B><A NAME="I35"></A></TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=140 VALIGN=top >
<BLOCKQUOTE>
<P>SQL_BIND_TYPE
<BR>(ODBC 1.0)
</BLOCKQUOTE></TD>
<TD COLSPAN=2 WIDTH=313 VALIGN=top >
<A NAME="E7E1751"></A>
<P>A 32-bit integer value that sets the binding orientation to be used when <B>SQLExtendedFetch</B> is called on the associated hstmt. Column-wise binding is selected by supplying the defined constant SQL_BIND_BY_COLUMN for the argument vParam. Row-wise binding is selected by supplying a value for vParam specifying the length of a structure or an instance of a buffer into which result columns will be bound.
<BLOCKQUOTE>
<P>The length specified in vParam must include space for all of the bound columns and any padding of the structure or buffer to ensure that when the address of a bound column is incremented with the specified length, the result will point to the beginning of the same column in the next row. When using the <B>sizeof</B> operator with structures or unions in ANSI C, this behavior is guaranteed.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>Column-wise binding is the default binding orientation for <B>SQLExtendedFetch</B>.
</BLOCKQUOTE><A NAME="I36"></A><A NAME="I37"></A><A NAME="I38"></A><A NAME="I39"></A><A NAME="I40"></A><A NAME="I41"></A><A NAME="I42"></A></TD>
</TR>
<TR>
<TD WIDTH=140 VALIGN=top >
<BLOCKQUOTE>
<P>SQL_CONCURRENCY
<BR>(ODBC 2.0)
</BLOCKQUOTE></TD>
<TD COLSPAN=2 WIDTH=313 VALIGN=top >
<A NAME="E7E1752"></A>
<P>A 32-bit integer value that specifies the cursor concurrency:
<BLOCKQUOTE>
<P>SQL_CONCUR_READ_ONLY = Cursor is read-only. No updates are allowed.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>SQL_CONCUR_LOCK = Cursor uses the lowest level of locking sufficient to ensure that the row can be updated.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>SQL_CONCUR_ROWVER =  Cursor uses optimistic concurrency control, comparing row versions, such as SQLBase ROWID or Sybase TIMESTAMP.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>SQL_CONCUR_VALUES = Cursor uses optimistic concurrency control, comparing values.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The default value is SQL_CONCUR_READ_ONLY. This option cannot be specified for an open cursor and can also be set through the fConcurrency argument in <B>SQLSetScrollOptions</B>.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If the specified concurrency is not supported by the data source, the driver substitutes a different concurrency and returns SQLSTATE 01S02 (Option value changed). For SQL_CONCUR_VALUES, the driver substitutes SQL_CONCUR_ROWVER, and vice versa. For SQL_CONCUR_LOCK, the driver substitutes, in order, SQL_CONCUR_ROWVER or SQL_CONCUR_VALUES.
</BLOCKQUOTE></TD>
</TR>
<TR>
<TD WIDTH=140 VALIGN=top >
<BLOCKQUOTE>
<P>SQL_CURSOR_TYPE
<BR>(ODBC 2.0)
</BLOCKQUOTE></TD>
<TD COLSPAN=2 WIDTH=313 VALIGN=top >
<A NAME="E7E1753"></A>
<P>A 32-bit integer value that specifies the cursor type:
<BLOCKQUOTE>
<P>SQL_CURSOR_FORWARD_ONLY = The cursor only scrolls forward.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>SQL_CURSOR_STATIC = The data in the result set is static.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>SQL_CURSOR_KEYSET_DRIVEN = The driver saves and uses the keys for the number of rows specified in the SQL_KEYSET_SIZE statement option.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>SQL_CURSOR_DYNAMIC = The driver only saves and uses the keys for the rows in the rowset.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The default value is SQL_CURSOR_FORWARD_ONLY. This option cannot be specified for an open cursor and can also be set through the crowKeyset argument in <B>SQLSetScrollOptions</B>.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If the specified cursor type is not supported by the data source, the driver substitutes a different cursor type and returns SQLSTATE 01S02 (Option value changed). For a mixed or dynamic cursor, the driver substitutes, in order, a keyset-driven or static cursor. For a keyset-driven cursor, the driver substitutes a static cursor.
</BLOCKQUOTE><A NAME="I43"></A></TD>
</TR>
<TR>
<TD WIDTH=140 VALIGN=top >
<BLOCKQUOTE>
<P>SQL_KEYSET_SIZE
<BR>(ODBC 2.0)
</BLOCKQUOTE></TD>
<TD COLSPAN=2 WIDTH=313 VALIGN=top >
<A NAME="E7E1754"></A>
<P>A 32-bit integer value that specifies the number of rows in the keyset for a keyset-driven cursor. If the keyset size is 0 (the default), the cursor is fully keyset-driven. If the keyset size is greater than 0, the cursor is mixed (keyset-driven within the keyset and dynamic outside of the keyset). The default keyset size is 0.
<BLOCKQUOTE>
<P>If the specified size exceeds the maximum keyset size, the driver substitutes that size and returns SQLSTATE 01S02 (Option value changed).
</BLOCKQUOTE>
<BLOCKQUOTE>
<P><B>SQLExtendedFetch</B> returns an error if the keyset size is greater than 0 and less than the rowset size.
</BLOCKQUOTE><A NAME="I44"></A><A NAME="I45"></A><A NAME="I46"></A><A NAME="I47"></A><A NAME="I48"></A><A NAME="I49"></A></TD>
</TR>
<TR>
<TD WIDTH=140 VALIGN=top >
<BLOCKQUOTE>
<P>SQL_MAX_LENGTH
<BR>(ODBC 1.0)
</BLOCKQUOTE></TD>
<TD COLSPAN=2 WIDTH=313 VALIGN=top >
<A NAME="E7E1755"></A>
<P>A 32-bit integer value that specifies the maximum amount of data that the driver returns from a character or binary column. If vParam is less than the length of the available data, <B>SQLFetch</B> or <B>SQLGetData</B> truncates the data and returns SQL_SUCCESS. If vParam is 0 (the default), the driver attempts to return all available data.
<BLOCKQUOTE>
<P>If the specified length is less than the minimum amount of data that the data source can return (the minimum is 254 bytes on many data sources), or greater than the maximum amount of data that the data source can return, the driver substitutes that value and returns SQLSTATE 01S02 (Option value changed).
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>This option is intended to reduce network traffic and should only be supported when the data source (as opposed to the driver) in a multiple-tier driver can implement it. To truncate data, an application should specify the maximum buffer length in the cbValueMax argument in <B>SQLBindCol</B> or <B>SQLGetData</B>.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P> <B>Note</B>   In ODBC 1.0, this statement option only applied to SQL_LONGVARCHAR and SQL_LONGVARBINARY columns.
</BLOCKQUOTE><A NAME="I50"></A><A NAME="I51"></A></TD>
</TR>
<TR>
<TD WIDTH=140 VALIGN=top >
<BLOCKQUOTE>
<P>SQL_MAX_ROWS
<BR>(ODBC 1.0)
</BLOCKQUOTE></TD>
<TD COLSPAN=2 WIDTH=313 VALIGN=top >
<A NAME="E7E1756"></A>
<P>A 32-bit integer value corresponding to the maximum number of rows to return to the application for a <B>SELECT</B> statement. If vParam equals 0 (the default), then the driver returns all rows.
<BLOCKQUOTE>
<P>This option is intended to reduce network traffic. Conceptually, it is applied when the result set is created and limits the result set to the first vParam rows.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If the specified number of rows exceeds the number of rows that can be returned by the data source, the driver substitutes that value and returns SQLSTATE 01S02 (Option value changed).
</BLOCKQUOTE><A NAME="I52"></A><A NAME="I53"></A><A NAME="I54"></A></TD>
</TR>
<TR>
<TD WIDTH=140 VALIGN=top >
<BLOCKQUOTE>
<P>SQL_NOSCAN
<BR>(ODBC 1.0)
</BLOCKQUOTE></TD>
<TD COLSPAN=2 WIDTH=313 VALIGN=top >
<A NAME="E7E1757"></A>
<P>A 32-bit integer value that specifies whether the driver does not scan SQL strings for escape clauses:
<BLOCKQUOTE>
<P>SQL_NOSCAN_OFF = The driver scans SQL strings for escape clauses (the default).
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>SQL_NOSCAN_ON = The driver does not scan SQL strings for escape clauses. Instead, the driver sends the statement directly to the data source.
</BLOCKQUOTE><A NAME="I55"></A><A NAME="I56"></A></TD>
</TR>
<TR>
<TD WIDTH=140 VALIGN=top >
<BLOCKQUOTE>
<P>SQL_QUERY_
<BR>TIMEOUT
<BR>(ODBC 1.0)
</BLOCKQUOTE></TD>
<TD COLSPAN=2 WIDTH=313 VALIGN=top >
<A NAME="E7E1758"></A>
<P>A 32-bit integer value corresponding to the number of seconds to wait for an SQL statement to execute before returning to the application. If vParam equals 0 (the default), then there is no time out.
<BLOCKQUOTE>
<P>If the specified timeout exceeds the maximum timeout in the data source or is smaller than the minimum timeout, the driver substitutes that value and returns SQLSTATE 01S02 (Option value changed).
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>Note that the application need not call <B>SQLFreeStmt</B> with the SQL_CLOSE option to reuse the hstmt if a <B>SELECT</B> statement timed out.
</BLOCKQUOTE><A NAME="I57"></A><A NAME="I58"></A><A NAME="I59"></A><A NAME="I60"></A></TD>
</TR>
<TR>
<TD WIDTH=140 VALIGN=top >
<BLOCKQUOTE>
<P>SQL_RETRIEVE_DATA
<BR>(ODBC 2.0)
</BLOCKQUOTE></TD>
<TD COLSPAN=2 WIDTH=313 VALIGN=top >
<A NAME="E7E1759"></A>
<P>A 32-bit integer value:
<BLOCKQUOTE>
<P>SQL_RD_ON = <B>SQLExtendedFetch</B> retrieves data after it positions the cursor to the specified location. This is the default.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>SQL_RD_OFF = <B>SQLExtendedFetch</B> does not retrieve data after it positions the cursor.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>By setting SQL_RETRIEVE_DATA to SQL_RD_OFF, an application can verify if a row exists or retrieve a bookmark for the row without incurring the overhead of retrieving rows.
</BLOCKQUOTE></TD>
</TR>
<TR>
<TD WIDTH=140 VALIGN=top >
<BLOCKQUOTE>
<P>SQL_ROWSET_SIZE
<BR>(ODBC 2.0)
</BLOCKQUOTE></TD>
<TD COLSPAN=2 WIDTH=313 VALIGN=top >
<A NAME="E7E1760"></A>
<P>A 32-bit integer value that specifies the number of rows in the rowset. This is the number of rows returned by each call to <B>SQLExtendedFetch</B>. The default value is 1.
<BLOCKQUOTE>
<P>If the specified rowset size exceeds the maximum rowset size supported by the data source, the driver substitutes that value and returns SQLSTATE 01S02 (Option value changed).
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>This option can be specified for an open cursor and can also be set through the crowRowset argument in <B>SQLSetScrollOptions</B>.
</BLOCKQUOTE><A NAME="I61"></A><A NAME="I62"></A><A NAME="I63"></A><A NAME="I64"></A></TD>
</TR>
<TR>
<TD WIDTH=140 VALIGN=top >
<BLOCKQUOTE>
<P>SQL_SIMULATE_
<BR>CURSOR
<BR>(ODBC 2.0)
</BLOCKQUOTE></TD>
<TD COLSPAN=2 WIDTH=313 VALIGN=top >
<A NAME="E7E1761"></A>
<P>A 32-bit integer value that specifies whether drivers that simulate positioned update and delete statements guarantee that such statements affect only one single row.
<BLOCKQUOTE>
<P>To simulate positioned update and delete statements, most drivers construct a searched <B>UPDATE</B> or <B>DELETE</B> statement containing a <B>WHERE</B> clause that specifies the value of each column in the current row. Unless these columns comprise a unique key, such a statement may affect more than one row.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>To guarantee that such statements affect only one row, the driver determines the columns in a unique key and adds these columns to the result set. If an application guarantees that the columns in the result set comprise a unique key, the driver is not required to do so. This may reduce execution time.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>SQL_SC_NON_UNIQUE = The driver does not guarantee that simulated positioned update or delete statements will affect only one row; it is the application&#146;s responsibility to do so. If a statement affects more than one row, <B>SQLExecute</B> or <B>SQLExecDirect</B> returns SQLSTATE 01000 (General warning).
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>SQL_SC_TRY_UNIQUE = The driver attempts to guarantee that simulated positioned update or delete statements affect only one row. The driver always executes such statements, even if they might affect more than one row, such as when there is no unique key. If a statement affects more than one row, <B>SQLExecute</B> or <B>SQLExecDirect</B> returns SQLSTATE 01000 (General warning).
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>SQL_SC_UNIQUE = The driver guarantees that simulated positioned update or delete statements affect only one row. If the driver cannot guarantee this for a given statement, <B>SQLExecDirect</B> or <B>SQLPrepare</B> returns an error.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If the specified cursor simulation type is not supported by the data source, the driver substitutes a different simulation type and returns SQLSTATE 01S02 (Option value changed). For SQL_SC_UNIQUE, the driver substitutes, in order, SQL_SC_TRY_UNIQUE or SQL_SC_NON_UNIQUE. For SQL_SC_TRY_UNIQUE, the driver substitutes SQL_SC_NON_UNIQUE.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If a driver does not simulate positioned update and delete statements, it returns SQLSTATE S1C00 (Driver not capable).
</BLOCKQUOTE><A NAME="I65"></A></TD>
</TR>
<TR>
<TD WIDTH=140 VALIGN=top >
<BLOCKQUOTE>
<P>SQL_USE_
<BR>BOOKMARKS
<BR>(ODBC 2.0)
</BLOCKQUOTE></TD>
<TD COLSPAN=2 WIDTH=313 VALIGN=top >
<A NAME="E7E1762"></A>
<P>A 32-bit integer value that specifies whether an application will use bookmarks with a cursor:
<BLOCKQUOTE>
<P>SQL_UB_OFF = Off (the default)
<BR>SQL_UB_ON = On
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>To use bookmarks with a cursor, the application must specify this option with the SQL_UB_ON value before opening the cursor.
</BLOCKQUOTE></TD></TR></TABLE>
<A NAME="E11E335"></A>
<H3>
<FONT FACE="Arial">Code Example<A NAME="I66"></A></FONT></H3>
<BLOCKQUOTE>
<P>See <B>SQLExtendedFetch</B>.
</BLOCKQUOTE>
<A NAME="E11E336"></A>
<H3>
<FONT FACE="Arial">Related Functions</FONT></H3>

<TABLE WIDTH=800 >
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P><B>For information about</B>
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1763"></A>
<P>See</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Canceling statement processing
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1764"></A>
<P><B>SQLCancel</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Returning the setting of a connection option
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1765"></A>
<P><B>SQLGetConnectOption</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Returning the setting of a statement option
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1766"></A>
<P><B>SQLGetStmtOption</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Setting a connection option
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1767"></A>
<P><B>SQLSetConnectOption</B> (extension)</TD></TR></TABLE><A NAME="E10E105"></A>
<H2>
<FONT FACE="Arial"><B>SQLSpecialColumns (ODBC 1.0, Level 1)</B><A NAME="I67"></A></FONT></H2>
<BLOCKQUOTE>
<P><B>SQLSpecialColumns</B> retrieves the following information about columns within a specified table:<A NAME="I68"></A>
</BLOCKQUOTE>
<UL>
<BLOCKQUOTE>
<LI>The optimal set of columns that uniquely identifies a row in the table.<A NAME="I69"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<LI>Columns that are automatically updated when any value in the row is updated by a transaction.
</BLOCKQUOTE></UL>
<A NAME="E11E337"></A>
<H3>
<FONT FACE="Arial">Syntax</FONT></H3>
<BLOCKQUOTE>
<P>RETCODE <B>SQLSpecialColumns</B>(<I>hstmt</I>, <I>fColType</I>, <I>szTableQualifier</I>, <I>cbTableQualifier</I>, <I>szTableOwner</I>, <I>cbTableOwner</I>, <I>szTableName</I>, <I>cbTableName</I>, <I>fScope</I>, <I>fNullable</I>)<A NAME="I70"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The <B>SQLSpecialColumns</B> function accepts the following arguments:
</BLOCKQUOTE>
<TABLE WIDTH=800 >
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P><B>Type</B>
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1768"></A>
<P>Argument
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1768"></A>
<P>Use
</TD><TD WIDTH=206 VALIGN=top >
<A NAME="E7E1768"></A>
<P>Description</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>HSTMT
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1769"></A>
<P><I>hstmt</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1769"></A>
<P>Input
</TD><TD WIDTH=206 VALIGN=top >
<A NAME="E7E1769"></A>
<P>Statement handle.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>UWORD
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1770"></A>
<P><I>fColType</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1770"></A>
<P>Input
</TD><TD WIDTH=206 VALIGN=top >
<A NAME="E7E1770"></A>
<P>Type of column to return. Must be one of the following values:
<BLOCKQUOTE>
<P>SQL_BEST_ROWID: Returns the optimal column or set of columns that, by retrieving values from the column or columns, allows any row in the specified table to be uniquely identified. A column can be either a pseudocolumn specifically designed for this purpose (as in Oracle ROWID or Ingres TID) or the column or columns of any unique index for the table.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>SQL_ROWVER: Returns the column or columns in the specified table, if any, that are automatically updated by the data source when any value in the row is updated by any transaction (as in SQLBase ROWID or Sybase TIMESTAMP).</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>UCHAR FAR *
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1771"></A>
<P><I>szTableQualifie</I><I>r</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1771"></A>
<P>Input
</TD><TD WIDTH=206 VALIGN=top >
<A NAME="E7E1771"></A>
<P>Qualifier name for the table. If a driver supports qualifiers for some tables but not for others, such as when the driver retrieves data from different DBMSs, an empty string (&quot;&quot;) denotes those tables that do not have qualifiers.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>SWORD
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1772"></A>
<P><I>cbTableQualifie</I><I>r</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1772"></A>
<P>Input
</TD><TD WIDTH=206 VALIGN=top >
<A NAME="E7E1772"></A>
<P>Length of <I>szTableQualifier</I>.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>UCHAR FAR *
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1773"></A>
<P><I>szTableOwner</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1773"></A>
<P>Input
</TD><TD WIDTH=206 VALIGN=top >
<A NAME="E7E1773"></A>
<P>Owner name for the table. If a driver supports owners for some tables but not for others, such as when the driver retrieves data from different DBMSs, an empty string (&quot;&quot;) denotes those tables that do not have owners.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>SWORD
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1774"></A>
<P><I>cbTableOwner</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1774"></A>
<P>Input
</TD><TD WIDTH=206 VALIGN=top >
<A NAME="E7E1774"></A>
<P>Length of <I>szTableOwner</I>.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>UCHAR FAR *
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1775"></A>
<P><I>szTableName</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1775"></A>
<P>Input
</TD><TD WIDTH=206 VALIGN=top >
<A NAME="E7E1775"></A>
<P>Table name.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>SWORD
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1776"></A>
<P><I>cbTableName</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1776"></A>
<P>Input
</TD><TD WIDTH=206 VALIGN=top >
<A NAME="E7E1776"></A>
<P>Length of <I>szTableName</I>.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>UWORD
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1777"></A>
<P><I>fScope</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1777"></A>
<P>Input
</TD><TD WIDTH=206 VALIGN=top >
<A NAME="E7E1777"></A>
<P>Minimum required scope of the rowid. The returned rowid may be of greater scope. Must be one of the following:
<BLOCKQUOTE>
<P>SQL_SCOPE_CURROW: The rowid is guaranteed to be valid only while positioned on that row. A later reselect using rowid may not return a row if the row was updated or deleted by another transaction.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>SQL_SCOPE_TRANSACTION: The rowid is guaranteed to be valid for the duration of the current transaction.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>SQL_SCOPE_SESSION: The rowid is guaranteed to be valid for the duration of the session (across transaction boundaries).</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>UWORD
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1778"></A>
<P><I>fNullable</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1778"></A>
<P>Input
</TD><TD WIDTH=206 VALIGN=top >
<A NAME="E7E1778"></A>
<P>Determines whether to return special columns that can have a NULL value. Must be one of the following:
<BLOCKQUOTE>
<P>SQL_NO_NULLS: Exclude special columns that can have NULL values.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>SQL_NULLABLE: Return special columns even if they can have NULL values.</TD></TR></BLOCKQUOTE></TABLE>
<A NAME="E11E338"></A>
<H3>
<FONT FACE="Arial">Returns<A NAME="I71"></A></FONT></H3>
<BLOCKQUOTE>
<P>SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.
</BLOCKQUOTE>
<A NAME="E11E339"></A>
<H3>
<FONT FACE="Arial">Diagnostics<A NAME="I72"></A></FONT></H3>
<BLOCKQUOTE>
<P>When <B>SQLSpecialColumns</B> returns SQL_ERROR or SQL_SUCCESS_WITH_INFO, an associated SQLSTATE value may be obtained by calling <B>SQLError</B>. The following table lists the SQLSTATE values commonly returned by <B>SQLSpecialColumns </B>and explains each one in the context of this function; the notation &quot;(DM)&quot; precedes the descriptions of SQLSTATEs returned by the Driver Manager. The return code associated with each SQLSTATE value is SQL_ERROR, unless noted otherwise.
</BLOCKQUOTE>
<TABLE WIDTH=800 >
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P><B>SQLSTATE</B>
</BLOCKQUOTE></TD>
<TD WIDTH=160 VALIGN=top >
<A NAME="E7E1779"></A>
<P>Error
</TD><TD WIDTH=200 VALIGN=top >
<A NAME="E7E1779"></A>
<P>Description</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>01000
</BLOCKQUOTE></TD>
<TD WIDTH=160 VALIGN=top >
<A NAME="E7E1780"></A>
<P>General warning
</TD><TD WIDTH=200 VALIGN=top >
<A NAME="E7E1780"></A>
<P>Driver-specific informational message. (Function returns SQL_SUCCESS_WITH_INFO.)</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>08S01
</BLOCKQUOTE></TD>
<TD WIDTH=160 VALIGN=top >
<A NAME="E7E1781"></A>
<P>Communication link failure
</TD><TD WIDTH=200 VALIGN=top >
<A NAME="E7E1781"></A>
<P>The communication link between the driver and the data source to which the driver was connected failed before the function completed processing.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>24000
</BLOCKQUOTE></TD>
<TD WIDTH=160 VALIGN=top >
<A NAME="E7E1782"></A>
<P>Invalid cursor state
</TD><TD WIDTH=200 VALIGN=top >
<A NAME="E7E1782"></A>
<P>(DM) A cursor was open on the <I>hstmt</I> and <B>SQLFetch</B> or <B>SQLExtendedFetch</B> had been called.
<BLOCKQUOTE>
<P>A cursor was open on the <I>hstmt</I> but <B>SQLFetch</B> or <B>SQLExtendedFetch</B> had not been called.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>IM001
</BLOCKQUOTE></TD>
<TD WIDTH=160 VALIGN=top >
<A NAME="E7E1783"></A>
<P>Driver does not support this function
</TD><TD WIDTH=200 VALIGN=top >
<A NAME="E7E1783"></A>
<P>(DM) The driver associated with the <I>hstmt</I> does not support the function.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1000
</BLOCKQUOTE></TD>
<TD WIDTH=160 VALIGN=top >
<A NAME="E7E1784"></A>
<P>General error
</TD><TD WIDTH=200 VALIGN=top >
<A NAME="E7E1784"></A>
<P>An error occurred for which there was no specific SQLSTATE and for which no implementation-specific SQLSTATE was defined. The error message returned by <B>SQLError</B> in the argument <I>szErrorMsg</I> describes the error and its cause.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1001
</BLOCKQUOTE></TD>
<TD WIDTH=160 VALIGN=top >
<A NAME="E7E1785"></A>
<P>Memory allocation failure
</TD><TD WIDTH=200 VALIGN=top >
<A NAME="E7E1785"></A>
<P>The driver was unable to allocate memory required to support execution or completion of the function.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1008
</BLOCKQUOTE></TD>
<TD WIDTH=160 VALIGN=top >
<A NAME="E7E1786"></A>
<P>Operation canceled
</TD><TD WIDTH=200 VALIGN=top >
<A NAME="E7E1786"></A>
<P>Asynchronous processing was enabled for the <I>hstmt</I>. The function was called and before it completed execution, <B>SQLCancel</B> was called on the <I>hstmt</I>. Then the function was called again on the <I>hstmt</I>.
<BLOCKQUOTE>
<P>The function was called and, before it completed execution, <B>SQLCancel</B> was called on the <I>hstmt</I> from a different thread in a multithreaded application.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1010
</BLOCKQUOTE></TD>
<TD WIDTH=160 VALIGN=top >
<A NAME="E7E1787"></A>
<P>Function sequence error
</TD><TD WIDTH=200 VALIGN=top >
<A NAME="E7E1787"></A>
<P>(DM) An asynchronously executing function (not this one) was called for the <I>hstmt</I> and was still executing when this function was called.
<BLOCKQUOTE>
<P>(DM) <B>SQLExecute</B>, <B>SQLExecDirect</B>, or <B>SQLSetPos</B> was called for the <I>hstmt</I> and returned SQL_NEED_DATA. This function was called before data was sent for all data-at-execution parameters or columns.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1090
</BLOCKQUOTE></TD>
<TD WIDTH=160 VALIGN=top >
<A NAME="E7E1788"></A>
<P>Invalid string or buffer length
</TD><TD WIDTH=200 VALIGN=top >
<A NAME="E7E1788"></A>
<P>(DM) The value of one of the length arguments was less than 0, but not equal to SQL_NTS.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top ><BR></TD>
<TD WIDTH=160 VALIGN=top ><BR></TD>
<TD WIDTH=200 VALIGN=top >
<BLOCKQUOTE>
<P>The<B> </B>value of one of the length arguments exceeded the maximum length value for the corresponding qualifier or name. The maximum length of each qualifier or name may be obtained by calling <B>SQLGetInfo</B> with the <I>fInfoType</I> values: SQL_MAX_QUALIFIER_NAME_LEN, SQL_MAX_OWNER_NAME_LEN, or SQL_MAX_TABLE_NAME_LEN.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1097
</BLOCKQUOTE></TD>
<TD WIDTH=160 VALIGN=top >
<A NAME="E7E1789"></A>
<P>Column type out of range
</TD><TD WIDTH=200 VALIGN=top >
<A NAME="E7E1789"></A>
<P>(DM) An invalid <I>fColType</I> value was specified.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1098
</BLOCKQUOTE></TD>
<TD WIDTH=160 VALIGN=top >
<A NAME="E7E1790"></A>
<P>Scope type out of range
</TD><TD WIDTH=200 VALIGN=top >
<A NAME="E7E1790"></A>
<P>(DM) An invalid <I>fScope</I> value was specified.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1099
</BLOCKQUOTE></TD>
<TD WIDTH=160 VALIGN=top >
<A NAME="E7E1791"></A>
<P>Nullable type out of range
</TD><TD WIDTH=200 VALIGN=top >
<A NAME="E7E1791"></A>
<P>(DM) An invalid <I>fNullable</I> value was specified.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1C00
</BLOCKQUOTE></TD>
<TD WIDTH=160 VALIGN=top >
<A NAME="E7E1792"></A>
<P>Driver not capable
</TD><TD WIDTH=200 VALIGN=top >
<A NAME="E7E1792"></A>
<P>A table qualifier was specified and the driver or data source does not support qualifiers.
<BLOCKQUOTE>
<P>A table owner was specified and the driver or data source does not support owners.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=93 VALIGN=top ><BR></TD>
<TD WIDTH=160 VALIGN=top ><BR></TD>
<TD WIDTH=200 VALIGN=top >
<BLOCKQUOTE>
<P>The combination of the current settings of the SQL_CONCURRENCY and SQL_CURSOR_TYPE statement options was not supported by the driver or data source.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1T00
</BLOCKQUOTE></TD>
<TD WIDTH=160 VALIGN=top >
<A NAME="E7E1793"></A>
<P>Timeout expired
</TD><TD WIDTH=200 VALIGN=top >
<A NAME="E7E1793"></A>
<P>The timeout period expired before the data source returned the requested result set. The timeout period is set through <B>SQLSetStmtOption</B>, SQL_QUERY_TIMEOUT.</TD></TR></TABLE>
<A NAME="E11E340"></A>
<H3>
<FONT FACE="Arial">Comments<A NAME="I73"></A><A NAME="I74"></A></FONT></H3>
<BLOCKQUOTE>
<P><B>SQLSpecialColumns</B> is provided so that applications can provide their own custom scrollable-cursor functionality, similar to that provided by <B>SQLExtendedFetch</B> and <B>SQLSetStmtOption</B>.<A NAME="I75"></A><A NAME="I76"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>When the <I>fColType</I> argument is SQL_BEST_ROWID, <B>SQLSpecialColumns</B> returns the column or columns that uniquely identify each row in the table. These columns can always be used in a <I>select-list</I> or <B>WHERE</B> clause. However, <B>SQLColumns</B> does not necessarily return these columns. For example, <B>SQLColumns</B> might not return the Oracle ROWID pseudo-column ROWID. If there are no columns that uniquely identify each row in the table, <B>SQLSpecialColumns</B> returns a rowset with no rows; a subsequent call to <B>SQLFetch</B> or <B>SQLExtendedFetch</B> on the <I>hstmt</I> returns SQL_NO_DATA_FOUND.<A NAME="I77"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If the <I>fColType</I>, <I>fScope</I>, or <I>fNullable</I> arguments specify characteristics that are not supported by the data source, <B>SQLSpecialColumns</B> returns a result set with no rows (as opposed to the function returning SQL_ERROR with SQLSTATE S1C00 (Driver not capable)). A subsequent call to <B>SQLFetch</B> or <B>SQLExtendedFetch</B> on the <I>hstmt</I> will return SQL_NO_DATA_FOUND.<A NAME="I78"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P><B>SQLSpecialColumns</B> returns the results as a standard result set, ordered by SCOPE. The following table lists the columns in the result set.<A NAME="I79"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The lengths of VARCHAR columns shown in the table are maximums; the actual lengths depend on the data source. To determine the actual length of the COLUMN_NAME column, an application can call <B>SQLGetInfo</B> with the SQL_MAX_COLUMN_NAME_LEN option.
</BLOCKQUOTE>
<TABLE WIDTH=800 >
<TR>
<TD WIDTH=126 VALIGN=top >
<BLOCKQUOTE>
<P><B>Column Name</B>
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E1794"></A>
<P>Data Type
</TD><TD WIDTH=213 VALIGN=top >
<A NAME="E7E1794"></A>
<P>Comments</TD>
</TR>
<TR>
<TD WIDTH=126 VALIGN=top >
<BLOCKQUOTE>
<P>SCOPE
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E1795"></A>
<P>Smallint
</TD><TD WIDTH=213 VALIGN=top >
<A NAME="E7E1795"></A>
<P>Actual scope of the rowid. Contains one of the following values:
<BLOCKQUOTE>
<P>SQL_SCOPE_CURROW
<BR>SQL_SCOPE_TRANSACTION
<BR>SQL_SCOPE_SESSION
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>NULL is returned when <I>fColType</I> is SQL_ROWVER. For a description of each value, see the description of <I>fScope</I> in the &quot;Syntax&quot; section above.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=126 VALIGN=top >
<BLOCKQUOTE>
<P>COLUMN_NAME
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E1796"></A>
<P>Varchar(128)
<BR>not NULL
</TD><TD WIDTH=213 VALIGN=top >
<A NAME="E7E1797"></A>
<P>Column identifier.</TD>
</TR>
<TR>
<TD WIDTH=126 VALIGN=top >
<BLOCKQUOTE>
<P>DATA_TYPE
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E1798"></A>
<P>Smallint
<BR>not NULL
</TD><TD WIDTH=213 VALIGN=top >
<A NAME="E7E1799"></A>
<P>SQL data type. This can be an ODBC SQL data type or a driver-specific SQL data type. For a list of valid ODBC SQL data types, see &quot;SQL Data Types&quot; in Appendix D, &quot;Data Types.&quot; For information about driver-specific SQL data types, see the driver&#146;s documentation.</TD>
</TR>
<TR>
<TD WIDTH=126 VALIGN=top >
<BLOCKQUOTE>
<P>TYPE_NAME
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E1800"></A>
<P>Varchar(128)
<BR>not NULL
</TD><TD WIDTH=213 VALIGN=top >
<A NAME="E7E1801"></A>
<P>Data source&#150;dependent data type name; for example, &quot;CHAR&quot;, &quot;VARCHAR&quot;, &quot;MONEY&quot;, &quot;LONG VARBINARY&quot;, or &quot;CHAR ( ) FOR BIT DATA&quot;.</TD>
</TR>
<TR>
<TD WIDTH=126 VALIGN=top >
<BLOCKQUOTE>
<P>PRECISION
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E1802"></A>
<P>Integer
</TD><TD WIDTH=213 VALIGN=top >
<A NAME="E7E1802"></A>
<P>The precision of the column on the data source. NULL is returned for data types where precision is not applicable. For more information concerning precision, see &quot;Precision, Scale, Length, and Display Size,&quot; in Appendix D, &quot;Data Types.&quot;</TD>
</TR>
<TR>
<TD WIDTH=126 VALIGN=top >
<BLOCKQUOTE>
<P>LENGTH
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E1803"></A>
<P>Integer
</TD><TD WIDTH=213 VALIGN=top >
<A NAME="E7E1803"></A>
<P>The length in bytes of data transferred on an <B>SQLGetData</B> or <B>SQLFetch</B> operation if SQL_C_DEFAULT is specified. For numeric data, this size may be different than the size of the data stored on the data source. This value is the same as the PRECISION column for character or binary data. For more information, see &quot;Precision, Scale, Length, and Display Size,&quot; in Appendix D, &quot;Data Types.&quot;</TD>
</TR>
<TR>
<TD WIDTH=126 VALIGN=top >
<BLOCKQUOTE>
<P>SCALE
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E1804"></A>
<P>Smallint
</TD><TD WIDTH=213 VALIGN=top >
<A NAME="E7E1804"></A>
<P>The scale of the column on the data source. NULL is returned for data types where scale is not applicable. For more information concerning scale, see &quot;Precision, Scale, Length, and Display Size,&quot; in Appendix D, &quot;Data Types.&quot;<A NAME="I80"></A><A NAME="I81"></A></TD>
</TR>
<TR>
<TD WIDTH=126 VALIGN=top >
<BLOCKQUOTE>
<P>PSEUDO_COLUMN
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E1805"></A>
<P>Smallint
</TD><TD WIDTH=213 VALIGN=top >
<A NAME="E7E1805"></A>
<P>Indicates whether the column is a pseudo-column, such as Oracle ROWID:
<BLOCKQUOTE>
<P>SQL_PC_UNKNOWN
<BR>SQL_PC_PSEUDO
<BR>SQL_PC_NOT_PSEUDO
</BLOCKQUOTE>
<BLOCKQUOTE>
<P> <B>Note</B>   For maximum interoperability, pseudo-columns should not be quoted with the identifier quote character returned by <B>SQLGetInfo</B>.</TD></TR></BLOCKQUOTE></TABLE><A NAME="I82"></A>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<NOTE>Note The PSEUDO_COLUMN column was added in ODBC 2.0. ODBC 1.0 drivers might return a different, driver-specific column with the same column number.<A NAME="I83"></A></NOTE>
<HR ALIGN=CENTER>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>Once the application retrieves values for SQL_BEST_ROWID, the application can use these values to reselect that row within the defined scope. The <B>SELECT</B> statement is guaranteed to return either no rows or one row.<A NAME="I84"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If an application reselects a row based on the rowid column or columns and the row is not found, then the application can assume that the row was deleted or the rowid columns were modified. The opposite is not true: even if the rowid has not changed, the other columns in the row may have changed.<A NAME="I85"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>Columns returned for column type SQL_BEST_ROWID are useful for applications that need to scroll forwards and backwards within a result set to retrieve the most recent data from a set of rows. The column or columns of the rowid are guaranteed not to change while positioned on that row.<A NAME="I86"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The column or columns of the rowid may remain valid even when the cursor is not positioned on the row; the application can determine this by checking the SCOPE column in the result set.<A NAME="I87"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>Columns returned for column type SQL_ROWVER are useful for applications that need the ability to check if any columns in a given row have been updated while the row was reselected using the rowid. For example, after reselecting a row using rowid, the application can compare the previous values in the SQL_ROWVER columns to the ones just fetched. If the value in a SQL_ROWVER column differs from the previous value, the application can alert the user that data on the display has changed.
</BLOCKQUOTE>
<A NAME="E11E341"></A>
<H3>
<FONT FACE="Arial">Code Example<A NAME="I88"></A></FONT></H3>
<BLOCKQUOTE>
<P>For a code example of a similar function, see <B>SQLColumns</B>.
</BLOCKQUOTE>
<A NAME="E11E342"></A>
<H3>
<FONT FACE="Arial">Related Functions</FONT></H3>

<TABLE WIDTH=800 >
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P><B>For information about</B>
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1806"></A>
<P>See</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Assigning storage for a column in a result set
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1807"></A>
<P><B>SQLBindCol</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Canceling statement processing
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1808"></A>
<P><B>SQLCancel</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Returning the columns in a table or tables
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1809"></A>
<P><B>SQLColumns</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Fetching a block of data or scrolling through a result set
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1810"></A>
<P><B>SQLExtendedFetch</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Fetching a row of data
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1811"></A>
<P><B>SQLFetch</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Returning the columns of a primary key
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1812"></A>
<P><B>SQLPrimaryKeys</B> (extension)</TD></TR></TABLE><A NAME="E10E106"></A>
<H2>
<FONT FACE="Arial"><B>SQLStatistics (ODBC 1.0, Level 1)</B><A NAME="I89"></A></FONT></H2>
<BLOCKQUOTE>
<P><B>SQLStatistics</B> retrieves a list of statistics about a single table and the indexes associated with the table. The driver returns the information as a result set.<!-- -->
</BLOCKQUOTE>
<A NAME="E11E343"></A>
<H3>
<FONT FACE="Arial">Syntax</FONT></H3>
<BLOCKQUOTE>
<P>RETCODE <B>SQLStatistics</B>(<I>hstmt</I>, <I>szTableQualifier</I>, <I>cbTableQualifier</I>,
<BR><I>szTableOwner</I>, <I>cbTableOwner</I>, <I>szTableName</I>, <I>cbTableName</I>, <I>fUnique</I>, <I>fAccuracy</I>)<A NAME="I90"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The <B>SQLStatistics</B> function accepts the following arguments:
</BLOCKQUOTE>
<TABLE WIDTH=800 >
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P><B>Type</B>
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E1813"></A>
<P>Argument
</TD><TD WIDTH=66 VALIGN=top >
<A NAME="E7E1813"></A>
<P>Use
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E1813"></A>
<P>Description</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>HSTMT
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E1814"></A>
<P><I>hstmt</I>
</TD><TD WIDTH=66 VALIGN=top >
<A NAME="E7E1814"></A>
<P>Input
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E1814"></A>
<P>Statement handle.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>UCHAR FAR *
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E1815"></A>
<P><I>szTableQualifier</I>
</TD><TD WIDTH=66 VALIGN=top >
<A NAME="E7E1815"></A>
<P>Input
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E1815"></A>
<P>Qualifier name. If a driver supports qualifiers for some tables but not for others, such as when the driver retrieves data from different DBMSs, an empty string (&quot;&quot;) denotes those tables that do not have qualifiers.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>SWORD
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E1816"></A>
<P><I>cbTableQualifier</I>
</TD><TD WIDTH=66 VALIGN=top >
<A NAME="E7E1816"></A>
<P>Input
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E1816"></A>
<P>Length of <I>szTableQualifier</I>.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>UCHAR FAR *
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E1817"></A>
<P><I>szTableOwner</I>
</TD><TD WIDTH=66 VALIGN=top >
<A NAME="E7E1817"></A>
<P>Input
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E1817"></A>
<P>Owner name. If a driver supports owners for some tables but not for others, such as when the driver retrieves data from different DBMSs, an empty string (&quot;&quot;) denotes those tables that do not have owners.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>SWORD
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E1818"></A>
<P><I>cbTableOwner</I>
</TD><TD WIDTH=66 VALIGN=top >
<A NAME="E7E1818"></A>
<P>Input
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E1818"></A>
<P>Length of <I>szTableOwner</I>.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>UCHAR FAR *
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E1819"></A>
<P><I>szTableName</I>
</TD><TD WIDTH=66 VALIGN=top >
<A NAME="E7E1819"></A>
<P>Input
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E1819"></A>
<P>Table name.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>SWORD
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E1820"></A>
<P><I>cbTableName</I>
</TD><TD WIDTH=66 VALIGN=top >
<A NAME="E7E1820"></A>
<P>Input
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E1820"></A>
<P>Length of <I>szTableName</I>.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>UWORD
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E1821"></A>
<P><I>fUnique</I>
</TD><TD WIDTH=66 VALIGN=top >
<A NAME="E7E1821"></A>
<P>Input
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E1821"></A>
<P>Type of index: SQL_INDEX_UNIQUE or SQL_INDEX_ALL.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>UWORD
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E1822"></A>
<P><I>fAccuracy</I>
</TD><TD WIDTH=66 VALIGN=top >
<A NAME="E7E1822"></A>
<P>Input
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E1822"></A>
<P>The importance of the CARDINALITY and PAGES columns in the result set:
<BLOCKQUOTE>
<P>SQL_ENSURE requests that the driver unconditionally retrieve the statistics.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>SQL_QUICK requests that the driver retrieve results only if they are readily available from the server. In this case, the driver does not ensure that the values are current.</TD></TR></BLOCKQUOTE></TABLE>
<A NAME="E11E344"></A>
<H3>
<FONT FACE="Arial">Returns<A NAME="I91"></A></FONT></H3>
<BLOCKQUOTE>
<P>SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.
</BLOCKQUOTE>
<A NAME="E11E345"></A>
<H3>
<FONT FACE="Arial">Diagnostics<A NAME="I92"></A></FONT></H3>
<BLOCKQUOTE>
<P>When <B>SQLStatistics</B> returns SQL_ERROR or SQL_SUCCESS_WITH_INFO, an associated SQLSTATE value may be obtained by calling <B>SQLError</B>. The following table lists the SQLSTATE values commonly returned by <B>SQLStatistics </B>and explains each one in the context of this function; the notation &quot;(DM)&quot; precedes the descriptions of SQLSTATEs returned by the Driver Manager. The return code associated with each SQLSTATE value is SQL_ERROR, unless noted otherwise.
</BLOCKQUOTE>
<TABLE WIDTH=800 >
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P><B>SQLSTATE</B>
</BLOCKQUOTE></TD>
<TD WIDTH=173 VALIGN=top >
<A NAME="E7E1823"></A>
<P>Error
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E1823"></A>
<P>Description</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>01000
</BLOCKQUOTE></TD>
<TD WIDTH=173 VALIGN=top >
<A NAME="E7E1824"></A>
<P>General warning
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E1824"></A>
<P>Driver-specific informational message. (Function returns SQL_SUCCESS_WITH_INFO.)</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>08S01
</BLOCKQUOTE></TD>
<TD WIDTH=173 VALIGN=top >
<A NAME="E7E1825"></A>
<P>Communication link failure
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E1825"></A>
<P>The communication link between the driver and the data source to which the driver was connected failed before the function completed processing.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>24000
</BLOCKQUOTE></TD>
<TD WIDTH=173 VALIGN=top >
<A NAME="E7E1826"></A>
<P>Invalid cursor state
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E1826"></A>
<P>(DM) A cursor was open on the <I>hstmt</I> and <B>SQLFetch</B> or <B>SQLExtendedFetch</B> had been called.
<BLOCKQUOTE>
<P>A cursor was open on the <I>hstmt</I> but <B>SQLFetch</B> or <B>SQLExtendedFetch</B> had not been called.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>IM001
</BLOCKQUOTE></TD>
<TD WIDTH=173 VALIGN=top >
<A NAME="E7E1827"></A>
<P>Driver does not support this function
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E1827"></A>
<P>(DM) The driver associated with the <I>hstmt</I> does not support the function.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>S1000
</BLOCKQUOTE></TD>
<TD WIDTH=173 VALIGN=top >
<A NAME="E7E1828"></A>
<P>General error
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E1828"></A>
<P>An error occurred for which there was no specific SQLSTATE and for which no implementation-specific SQLSTATE was defined. The error message returned by <B>SQLError</B> in the argument <I>szErrorMsg</I> describes the error and its cause.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>S1001
</BLOCKQUOTE></TD>
<TD WIDTH=173 VALIGN=top >
<A NAME="E7E1829"></A>
<P>Memory allocation failure
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E1829"></A>
<P>The driver was unable to allocate memory required to support execution or completion of the function.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>S1008
</BLOCKQUOTE></TD>
<TD WIDTH=173 VALIGN=top >
<A NAME="E7E1830"></A>
<P>Operation canceled
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E1830"></A>
<P>Asynchronous processing was enabled for the <I>hstmt</I>. The function was called and before it completed execution, <B>SQLCancel</B> was called on the <I>hstmt</I>. Then the function was called again on the <I>hstmt</I>.
<BLOCKQUOTE>
<P>The function was called and, before it completed execution, <B>SQLCancel</B> was called on the <I>hstmt</I> from a different thread in a multithreaded application.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>S1010
</BLOCKQUOTE></TD>
<TD WIDTH=173 VALIGN=top >
<A NAME="E7E1831"></A>
<P>Function sequence error
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E1831"></A>
<P>(DM) An asynchronously executing function (not this one) was called for the <I>hstmt</I> and was still executing when this function was called.
<BLOCKQUOTE>
<P>(DM) <B>SQLExecute</B>, <B>SQLExecDirect</B>, or <B>SQLSetPos</B> was called for the <I>hstmt</I> and returned SQL_NEED_DATA. This function was called before data was sent for all data-at-execution parameters or columns.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>S1090
</BLOCKQUOTE></TD>
<TD WIDTH=173 VALIGN=top >
<A NAME="E7E1832"></A>
<P>Invalid string or buffer length
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E1832"></A>
<P>(DM) The value of one of the name length arguments was less than 0, but not equal to SQL_NTS.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top ><BR></TD>
<TD WIDTH=173 VALIGN=top ><BR></TD>
<TD WIDTH=180 VALIGN=top >
<BLOCKQUOTE>
<P>The<B> </B>value of one of the name length arguments exceeded the maximum length value for the corresponding qualifier or name.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>S1100
</BLOCKQUOTE></TD>
<TD WIDTH=173 VALIGN=top >
<A NAME="E7E1833"></A>
<P>Uniqueness option type out of range
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E1833"></A>
<P>(DM) An invalid <I>fUnique</I> value was specified.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>S1101
</BLOCKQUOTE></TD>
<TD WIDTH=173 VALIGN=top >
<A NAME="E7E1834"></A>
<P>Accuracy option type out of range
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E1834"></A>
<P>(DM) An invalid <I>fAccuracy</I> value was specified.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>S1C00
</BLOCKQUOTE></TD>
<TD WIDTH=173 VALIGN=top >
<A NAME="E7E1835"></A>
<P>Driver not capable
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E1835"></A>
<P>A table qualifier was specified and the driver or data source does not support qualifiers.
<BLOCKQUOTE>
<P>A table owner was specified and the driver or data source does not support owners.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=100 VALIGN=top ><BR></TD>
<TD WIDTH=173 VALIGN=top ><BR></TD>
<TD WIDTH=180 VALIGN=top >
<BLOCKQUOTE>
<P>The combination of the current settings of the SQL_CONCURRENCY and SQL_CURSOR_TYPE statement options was not supported by the driver or data source.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>S1T00
</BLOCKQUOTE></TD>
<TD WIDTH=173 VALIGN=top >
<A NAME="E7E1836"></A>
<P>Timeout expired
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E1836"></A>
<P>The timeout period expired before the data source returned the requested result set. The timeout period is set through <B>SQLSetStmtOption</B>, SQL_QUERY_TIMEOUT.</TD></TR></TABLE>
<A NAME="E11E346"></A>
<H3>
<FONT FACE="Arial">Comments<A NAME="I93"></A><A NAME="I94"></A><A NAME="I95"></A></FONT></H3>
<BLOCKQUOTE>
<P><B>SQLStatistics</B> returns information about a single table as a standard result set, ordered by NON_UNIQUE, TYPE, INDEX_QUALIFIER, INDEX_NAME, and SEQ_IN_INDEX. The result set combines statistics information for the table with information about each index. The following table lists the columns in the result set.<A NAME="I96"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<NOTE>Note <B>SQLStatistics</B> might not return all indexes. For example, an Xbase driver might only return indexes in files in the current directory. Applications can use any valid index, regardless of whether it is returned by <B>SQLStatistics</B>.<A NAME="I97"></A></NOTE>
<HR ALIGN=CENTER>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The lengths of VARCHAR columns shown in the table are maximums; the actual lengths depend on the data source. To determine the actual lengths of the TABLE_QUALIFIER, TABLE_OWNER, TABLE_NAME, and COLUMN_NAME columns, an application can call <B>SQLGetInfo</B> with the SQL_MAX_QUALIFIER_NAME_LEN, SQL_MAX_OWNER_NAME_LEN, SQL_MAX_TABLE_NAME_LEN, and SQL_MAX_COLUMN_NAME_LEN options.
</BLOCKQUOTE>
<TABLE WIDTH=800 >
<TR>
<TD WIDTH=133 VALIGN=top >
<BLOCKQUOTE>
<P><B>Column Name</B>
</BLOCKQUOTE></TD>
<TD WIDTH=111 VALIGN=top >
<A NAME="E7E1837"></A>
<P>Data Type
</TD><TD WIDTH=209 VALIGN=top >
<A NAME="E7E1837"></A>
<P>Comments</TD>
</TR>
<TR>
<TD WIDTH=133 VALIGN=top >
<BLOCKQUOTE>
<P>TABLE_QUALIFIER
</BLOCKQUOTE></TD>
<TD WIDTH=111 VALIGN=top >
<A NAME="E7E1838"></A>
<P>Varchar(128)
</TD><TD WIDTH=209 VALIGN=top >
<A NAME="E7E1838"></A>
<P>Table qualifier identifier of the table to which the statistic or index applies; NULL if not applicable to the data source. If a driver supports qualifiers for some tables but not for others, such as when the driver retrieves data from different DBMSs, it returns an empty string (&quot;&quot;) for those tables that do not have qualifiers.</TD>
</TR>
<TR>
<TD WIDTH=133 VALIGN=top >
<BLOCKQUOTE>
<P>TABLE_OWNER
</BLOCKQUOTE></TD>
<TD WIDTH=111 VALIGN=top >
<A NAME="E7E1839"></A>
<P>Varchar(128)
</TD><TD WIDTH=209 VALIGN=top >
<A NAME="E7E1839"></A>
<P>Table owner identifier of the table to which the statistic or index applies; NULL if not applicable to the data source. If a driver supports owners for some tables but not for others, such as when the driver retrieves data from different DBMSs, it returns an empty string (&quot;&quot;) for those tables that do not have owners.</TD>
</TR>
<TR>
<TD WIDTH=133 VALIGN=top >
<BLOCKQUOTE>
<P>TABLE_NAME
</BLOCKQUOTE></TD>
<TD WIDTH=111 VALIGN=top >
<A NAME="E7E1840"></A>
<P>Varchar(128)
<BR>not NULL
</TD><TD WIDTH=209 VALIGN=top >
<A NAME="E7E1841"></A>
<P>Table identifier of the table to which the statistic or index applies.<A NAME="I98"></A></TD>
</TR>
<TR>
<TD WIDTH=133 VALIGN=top >
<BLOCKQUOTE>
<P>NON_UNIQUE
</BLOCKQUOTE></TD>
<TD WIDTH=111 VALIGN=top >
<A NAME="E7E1842"></A>
<P>Smallint
</TD><TD WIDTH=209 VALIGN=top >
<A NAME="E7E1842"></A>
<P>Indicates whether the index prohibits duplicate values:
<BLOCKQUOTE>
<P>TRUE if the index values can be nonunique.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>FALSE if the index values must be unique.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>NULL is returned if TYPE is SQL_TABLE_STAT.<A NAME="I99"></A></TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=133 VALIGN=top >
<BLOCKQUOTE>
<P>INDEX_QUALIFIER
</BLOCKQUOTE></TD>
<TD WIDTH=111 VALIGN=top >
<A NAME="E7E1843"></A>
<P>Varchar(128)
</TD><TD WIDTH=209 VALIGN=top >
<A NAME="E7E1843"></A>
<P>The identifier that is used to qualify the index name doing a <B>DROP </B><B>INDEX</B>; NULL is returned if an index qualifier is not supported by the data source or if TYPE is SQL_TABLE_STAT. If a non-null value is returned in this column, it must be used to qualify the index name on a <B>DROP INDEX</B> statement; otherwise the TABLE_OWNER name should be used to qualify the index name.</TD>
</TR>
<TR>
<TD WIDTH=133 VALIGN=top >
<BLOCKQUOTE>
<P>INDEX_NAME
</BLOCKQUOTE></TD>
<TD WIDTH=111 VALIGN=top >
<A NAME="E7E1844"></A>
<P>Varchar(128)
</TD><TD WIDTH=209 VALIGN=top >
<A NAME="E7E1844"></A>
<P>Index identifier; NULL is returned if TYPE is SQL_TABLE_STAT.<A NAME="I100"></A><A NAME="I101"></A><A NAME="I102"></A></TD>
</TR>
<TR>
<TD WIDTH=133 VALIGN=top >
<BLOCKQUOTE>
<P>TYPE
</BLOCKQUOTE></TD>
<TD WIDTH=111 VALIGN=top >
<A NAME="E7E1845"></A>
<P>Smallint
<BR>not NULL
</TD><TD WIDTH=209 VALIGN=top >
<A NAME="E7E1846"></A>
<P>Type of information being returned:
<BLOCKQUOTE>
<P>SQL_TABLE_STAT indicates a statistic for the table.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>SQL_INDEX_CLUSTERED indicates a clustered index.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>SQL_INDEX_HASHED indicates a hashed index.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>SQL_INDEX_OTHER indicates another type of index.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=133 VALIGN=top >
<BLOCKQUOTE>
<P>SEQ_IN_INDEX
</BLOCKQUOTE></TD>
<TD WIDTH=111 VALIGN=top >
<A NAME="E7E1847"></A>
<P>Smallint
</TD><TD WIDTH=209 VALIGN=top >
<A NAME="E7E1847"></A>
<P>Column sequence number in index (starting with 1); NULL is returned if TYPE is SQL_TABLE_STAT.<A NAME="I103"></A></TD>
</TR>
<TR>
<TD WIDTH=133 VALIGN=top >
<BLOCKQUOTE>
<P>COLUMN_NAME
</BLOCKQUOTE></TD>
<TD WIDTH=111 VALIGN=top >
<A NAME="E7E1848"></A>
<P>Varchar(128)
</TD><TD WIDTH=209 VALIGN=top >
<A NAME="E7E1848"></A>
<P>Column identifier. If the column is based on an expression, such as SALARY + BENEFITS, the expression is returned; if the expression cannot be determined, an empty string is returned. If the index is a filtered index, each column in the filter condition is returned; this may require more than one row. NULL is returned if TYPE is SQL_TABLE_STAT.<A NAME="I104"></A><A NAME="I105"></A><A NAME="I106"></A></TD>
</TR>
<TR>
<TD WIDTH=133 VALIGN=top >
<BLOCKQUOTE>
<P>COLLATION
</BLOCKQUOTE></TD>
<TD WIDTH=111 VALIGN=top >
<A NAME="E7E1849"></A>
<P>Char(1)
</TD><TD WIDTH=209 VALIGN=top >
<A NAME="E7E1849"></A>
<P>Sort sequence for the column; &quot;A&quot; for ascending; &quot;D&quot; for descending; NULL is returned if column sort sequence is not supported by the data source or if TYPE is SQL_TABLE_STAT.<A NAME="I107"></A><A NAME="I108"></A></TD>
</TR>
<TR>
<TD WIDTH=133 VALIGN=top >
<BLOCKQUOTE>
<P>CARDINALITY
</BLOCKQUOTE></TD>
<TD WIDTH=111 VALIGN=top >
<A NAME="E7E1850"></A>
<P>Integer
</TD><TD WIDTH=209 VALIGN=top >
<A NAME="E7E1850"></A>
<P>Cardinality of table or index; number of rows in table if TYPE is SQL_TABLE_STAT; number of unique values in the index if TYPE is not SQL_TABLE_STAT; NULL is returned if the value is not available from the data source.<A NAME="I109"></A><A NAME="I110"></A><A NAME="I111"></A><A NAME="I112"></A></TD>
</TR>
<TR>
<TD WIDTH=133 VALIGN=top >
<BLOCKQUOTE>
<P>PAGES
</BLOCKQUOTE></TD>
<TD WIDTH=111 VALIGN=top >
<A NAME="E7E1851"></A>
<P>Integer
</TD><TD WIDTH=209 VALIGN=top >
<A NAME="E7E1851"></A>
<P>Number of pages used to store the index or table; number of pages for the table if TYPE is SQL_TABLE_STAT; number of pages for the index if TYPE is not SQL_TABLE_STAT; NULL is returned if the value is not available from the data source, or if not applicable to the data source.</TD>
</TR>
<TR>
<TD WIDTH=133 VALIGN=top >
<BLOCKQUOTE>
<P>FILTER_CONDITION
</BLOCKQUOTE></TD>
<TD WIDTH=111 VALIGN=top >
<A NAME="E7E1852"></A>
<P>Varchar(128)
</TD><TD WIDTH=209 VALIGN=top >
<A NAME="E7E1852"></A>
<P>If the index is a filtered index, this is the filter condition, such as SALARY &gt; 30000; if the filter condition cannot be determined, this is an empty string.
<BLOCKQUOTE>
<P>NULL if the index is not a filtered index, it cannot be determined whether the index is a filtered index, or TYPE is SQL_TABLE_STAT.</TD></TR></BLOCKQUOTE></TABLE><A NAME="I113"></A>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<NOTE>Note The FILTER_CONDITION column was added in ODBC 2.0. ODBC 1.0 drivers might return a different, driver-specific column with the same column number.<A NAME="I114"></A></NOTE>
<HR ALIGN=CENTER>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If the row in the result set corresponds to a table, the driver sets TYPE to SQL_TABLE_STAT and sets NON_UNIQUE, INDEX_QUALIFIER, INDEX_NAME, SEQ_IN_INDEX, COLUMN_NAME, and COLLATION to NULL. If CARDINALITY or PAGES are not available from the data source, the driver sets them to NULL.
</BLOCKQUOTE>
<A NAME="E11E347"></A>
<H3>
<FONT FACE="Arial">Code Example<A NAME="I115"></A></FONT></H3>
<BLOCKQUOTE>
<P>For a code example of a similar function, see <B>SQLColumns</B>.
</BLOCKQUOTE>
<A NAME="E11E348"></A>
<H3>
<FONT FACE="Arial">Related Functions</FONT></H3>

<TABLE WIDTH=800 >
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P><B>For information about</B>
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1853"></A>
<P>See</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Assigning storage for a column in a result set
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1854"></A>
<P><B>SQLBindCol</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Canceling statement processing
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1855"></A>
<P><B>SQLCancel</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Fetching a block of data or scrolling through a result set
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1856"></A>
<P><B>SQLExtendedFetch</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Fetching a row of data
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1857"></A>
<P><B>SQLFetch</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Returning the columns of foreign keys
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1858"></A>
<P><B>SQLForeignKeys</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Returning the columns of a primary key
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1859"></A>
<P><B>SQLPrimaryKeys</B> (extension)</TD></TR></TABLE><A NAME="E10E107"></A>
<H2>
<FONT FACE="Arial"><B>SQLTablePrivileges (ODBC 1.0, Level 2)</B><A NAME="I116"></A></FONT></H2>
<BLOCKQUOTE>
<P><B>SQLTablePrivileges</B> returns a list of tables and the privileges associated with each table. The driver returns the information as a result set on the specified <I>hstmt</I>.
</BLOCKQUOTE>
<A NAME="E11E349"></A>
<H3>
<FONT FACE="Arial">Syntax</FONT></H3>
<BLOCKQUOTE>
<P>RETCODE <B>SQLTablePrivileges</B>(<I>hstmt</I>, <I>szTableQualifier</I>, <I>cbTableQualifier</I>,
<BR><I>szTableOwner</I>, <I>cbTableOwner</I>, <I>szTableName</I>, <I>cbTableName</I>)<A NAME="I117"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The <B>SQLTablePrivileges</B> function accepts the following arguments.
</BLOCKQUOTE>
<TABLE WIDTH=800 >
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P><B>Type</B>
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E1860"></A>
<P>Argument
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1860"></A>
<P>Use
</TD><TD WIDTH=193 VALIGN=top >
<A NAME="E7E1860"></A>
<P>Description</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>HSTMT
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E1861"></A>
<P><I>hstmt</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1861"></A>
<P>Input
</TD><TD WIDTH=193 VALIGN=top >
<A NAME="E7E1861"></A>
<P>Statement handle.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>UCHAR FAR *
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E1862"></A>
<P><I>szTableQualifier</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1862"></A>
<P>Input
</TD><TD WIDTH=193 VALIGN=top >
<A NAME="E7E1862"></A>
<P>Table qualifier. If a driver supports qualifiers for some tables but not for others, such as when the driver retrieves data from different DBMSs, an empty string (&quot;&quot;) denotes those tables that do not have qualifiers.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>SWORD
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E1863"></A>
<P><I>cbTableQualifier</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1863"></A>
<P>Input
</TD><TD WIDTH=193 VALIGN=top >
<A NAME="E7E1863"></A>
<P>Length of <I>szTableQualifier</I>. </TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>UCHAR FAR *
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E1864"></A>
<P><I>szTableOwner</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1864"></A>
<P>Input
</TD><TD WIDTH=193 VALIGN=top >
<A NAME="E7E1864"></A>
<P>String search pattern for owner names. If a driver supports owners for some tables but not for others, such as when the driver retrieves data from different DBMSs, an empty string (&quot;&quot;) denotes those tables that do not have owners.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>SWORD
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E1865"></A>
<P><I>cbTableOwner</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1865"></A>
<P>Input
</TD><TD WIDTH=193 VALIGN=top >
<A NAME="E7E1865"></A>
<P>Length of <I>szTableOwner</I>. </TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>UCHAR FAR *
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E1866"></A>
<P><I>szTableName</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1866"></A>
<P>Input
</TD><TD WIDTH=193 VALIGN=top >
<A NAME="E7E1866"></A>
<P>String search pattern for table names. </TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1866"></A>
<P>     SWORD
</TD><TD WIDTH=106 VALIGN=top >
<A NAME="E7E1867"></A>
<P><I>cbTableName</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1867"></A>
<P>Input
</TD><TD WIDTH=193 VALIGN=top >
<A NAME="E7E1867"></A>
<P>Length of <I>szTableName</I>. </TD></TR></TABLE>
<A NAME="E11E350"></A>
<H3>
<FONT FACE="Arial">Returns<A NAME="I118"></A></FONT></H3>
<BLOCKQUOTE>
<P>SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.
</BLOCKQUOTE>
<A NAME="E11E351"></A>
<H3>
<FONT FACE="Arial">Diagnostics<A NAME="I119"></A></FONT></H3>
<BLOCKQUOTE>
<P>When <B>SQLTablePrivileges</B> returns SQL_ERROR or SQL_SUCCESS_WITH_INFO, an associated SQLSTATE value may be obtained by calling <B>SQLError</B>. The following table lists the SQLSTATE values commonly returned by <B>SQLTablePrivileges</B> and explains each one in the context of this function; the notation &quot;(DM)&quot; precedes the descriptions of SQLSTATEs returned by the Driver Manager. The return code associated with each SQLSTATE value is SQL_ERROR, unless noted otherwise.
</BLOCKQUOTE>
<TABLE WIDTH=800 >
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P><B>SQLSTATE</B>
</BLOCKQUOTE></TD>
<TD WIDTH=153 VALIGN=top >
<A NAME="E7E1868"></A>
<P>Error
</TD><TD WIDTH=206 VALIGN=top >
<A NAME="E7E1868"></A>
<P>Description</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>01000
</BLOCKQUOTE></TD>
<TD WIDTH=153 VALIGN=top >
<A NAME="E7E1869"></A>
<P>General warning
</TD><TD WIDTH=206 VALIGN=top >
<A NAME="E7E1869"></A>
<P>Driver-specific informational message. (Function returns SQL_SUCCESS_WITH_INFO.)</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>08S01
</BLOCKQUOTE></TD>
<TD WIDTH=153 VALIGN=top >
<A NAME="E7E1870"></A>
<P>Communication link failure
</TD><TD WIDTH=206 VALIGN=top >
<A NAME="E7E1870"></A>
<P>The communication link between the driver and the data source to which the driver was connected failed before the function completed processing.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>24000
</BLOCKQUOTE></TD>
<TD WIDTH=153 VALIGN=top >
<A NAME="E7E1871"></A>
<P>Invalid cursor state
</TD><TD WIDTH=206 VALIGN=top >
<A NAME="E7E1871"></A>
<P>(DM) A cursor was open on the <I>hstmt</I> and <B>SQLFetch</B> or <B>SQLExtendedFetch</B> had been called.
<BLOCKQUOTE>
<P>A cursor was open on the <I>hstmt</I> but <B>SQLFetch</B> or <B>SQLExtendedFetch</B> had not been called.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>IM001
</BLOCKQUOTE></TD>
<TD WIDTH=153 VALIGN=top >
<A NAME="E7E1872"></A>
<P>Driver does not support this function
</TD><TD WIDTH=206 VALIGN=top >
<A NAME="E7E1872"></A>
<P>(DM) The driver associated with the <I>hstmt</I> does not support the function.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1000
</BLOCKQUOTE></TD>
<TD WIDTH=153 VALIGN=top >
<A NAME="E7E1873"></A>
<P>General error
</TD><TD WIDTH=206 VALIGN=top >
<A NAME="E7E1873"></A>
<P>An error occurred for which there was no specific SQLSTATE and for which no implementation-specific SQLSTATE was defined. The error message returned by <B>SQLError</B> in the argument <I>szErrorMsg</I> describes the error and its cause.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1001
</BLOCKQUOTE></TD>
<TD WIDTH=153 VALIGN=top >
<A NAME="E7E1874"></A>
<P>Memory allocation failure
</TD><TD WIDTH=206 VALIGN=top >
<A NAME="E7E1874"></A>
<P>The driver was unable to allocate memory required to support execution or completion of the function.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1008
</BLOCKQUOTE></TD>
<TD WIDTH=153 VALIGN=top >
<A NAME="E7E1875"></A>
<P>Operation canceled
</TD><TD WIDTH=206 VALIGN=top >
<A NAME="E7E1875"></A>
<P>Asynchronous processing was enabled for the <I>hstmt</I>. The function was called and before it completed execution, <B>SQLCancel</B> was called on the <I>hstmt</I>. Then the function was called again on the <I>hstmt</I>.
<BLOCKQUOTE>
<P>The function was called and, before it completed execution, <B>SQLCancel</B> was called on the <I>hstmt</I> from a different thread in a multithreaded application.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1010
</BLOCKQUOTE></TD>
<TD WIDTH=153 VALIGN=top >
<A NAME="E7E1876"></A>
<P>Function sequence error
</TD><TD WIDTH=206 VALIGN=top >
<A NAME="E7E1876"></A>
<P>(DM) An asynchronously executing function (not this one) was called for the <I>hstmt</I> and was still executing when this function was called.
<BLOCKQUOTE>
<P>(DM) <B>SQLExecute</B>, <B>SQLExecDirect</B>, or <B>SQLSetPos</B> was called for the <I>hstmt</I> and returned SQL_NEED_DATA. This function was called before data was sent for all data-at-execution parameters or columns.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1090
</BLOCKQUOTE></TD>
<TD WIDTH=153 VALIGN=top >
<A NAME="E7E1877"></A>
<P>Invalid string or buffer length
</TD><TD WIDTH=206 VALIGN=top >
<A NAME="E7E1877"></A>
<P>(DM) The value of one of the name length arguments was less than 0, but not equal to SQL_NTS.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top ><BR></TD>
<TD WIDTH=153 VALIGN=top ><BR></TD>
<TD WIDTH=206 VALIGN=top >
<BLOCKQUOTE>
<P>The<B> </B>value of one of the name length arguments exceeded the maximum length value for the corresponding qualifier or name.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1C00
</BLOCKQUOTE></TD>
<TD WIDTH=153 VALIGN=top >
<A NAME="E7E1878"></A>
<P>Driver not capable
</TD><TD WIDTH=206 VALIGN=top >
<A NAME="E7E1878"></A>
<P>A table qualifier was specified and the driver or data source does not support qualifiers.
<BLOCKQUOTE>
<P>A table owner was specified and the driver or data source does not support owners.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=93 VALIGN=top ><BR></TD>
<TD WIDTH=153 VALIGN=top ><BR></TD>
<TD WIDTH=206 VALIGN=top >
<BLOCKQUOTE>
<P>A string search pattern was specified for the table owner, table name, or column name and the data source does not support search patterns for one or more of those arguments.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The combination of the current settings of the SQL_CONCURRENCY and SQL_CURSOR_TYPE statement options was not supported by the driver or data source.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1T00
</BLOCKQUOTE></TD>
<TD WIDTH=153 VALIGN=top >
<A NAME="E7E1879"></A>
<P>Timeout expired
</TD><TD WIDTH=206 VALIGN=top >
<A NAME="E7E1879"></A>
<P>The timeout period expired before the data source returned the result set. The timeout period is set through <B>SQLSetStmtOption</B>, SQL_QUERY_TIMEOUT.</TD></TR></TABLE>
<A NAME="E11E352"></A>
<H3>
<FONT FACE="Arial">Comments<A NAME="I120"></A></FONT></H3>
<BLOCKQUOTE>
<P>The <I>szTableOwner</I> and <I>szTableName</I> arguments accept search patterns. For more information about valid search patterns, see &quot;Search Pattern Arguments&quot; earlier in this chapter.<A NAME="I121"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P><B>SQLTablePrivileges</B> returns the results as a standard result set, ordered by TABLE_QUALIFIER, TABLE_OWNER, TABLE_NAME, and PRIVILEGE. The following table lists the columns in the result set.<A NAME="I122"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<NOTE>Note <B>SQLTablePrivileges</B> might not return privileges for all tables. For example, an Xbase driver might only return privileges for files (tables) in the current directory. Applications can use any valid table, regardless of whether it is returned by <B>SQLTablePrivileges</B>.<A NAME="I123"></A></NOTE>
<HR ALIGN=CENTER>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The lengths of VARCHAR columns shown in the table are maximums; the actual lengths depend on the data source. To determine the actual lengths of the TABLE_QUALIFIER, TABLE_OWNER, and TABLE_NAME columns, an application can call <B>SQLGetInfo</B> with the SQL_MAX_QUALIFIER_NAME_LEN, SQL_MAX_OWNER_NAME_LEN, and SQL_MAX_TABLE_NAME_LEN options.
</BLOCKQUOTE>
<TABLE WIDTH=800 >
<TR>
<TD WIDTH=120 VALIGN=top >
<BLOCKQUOTE>
<P><B>Column Name</B>
</BLOCKQUOTE></TD>
<TD WIDTH=86 VALIGN=top >
<A NAME="E7E1880"></A>
<P>Data Type
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E1880"></A>
<P>Comments</TD>
</TR>
<TR>
<TD WIDTH=120 VALIGN=top >
<BLOCKQUOTE>
<P>TABLE_QUALIFIER
</BLOCKQUOTE></TD>
<TD WIDTH=86 VALIGN=top >
<A NAME="E7E1881"></A>
<P>Varchar(128)
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E1881"></A>
<P>Table qualifier identifier; NULL if not applicable to the data source. If a driver supports qualifiers for some tables but not for others, such as when the driver retrieves data from different DBMSs, it returns an empty string (&quot;&quot;) for those tables that do not have qualifiers.</TD>
</TR>
<TR>
<TD WIDTH=120 VALIGN=top >
<BLOCKQUOTE>
<P>TABLE_OWNER
</BLOCKQUOTE></TD>
<TD WIDTH=86 VALIGN=top >
<A NAME="E7E1882"></A>
<P>Varchar(128)
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E1882"></A>
<P>Table owner identifier; NULL if not applicable to the data source. If a driver supports owners for some tables but not for others, such as when the driver retrieves data from different DBMSs, it returns an empty string (&quot;&quot;) for those tables that do not have owners.</TD>
</TR>
<TR>
<TD WIDTH=120 VALIGN=top >
<BLOCKQUOTE>
<P>TABLE_NAME
</BLOCKQUOTE></TD>
<TD WIDTH=86 VALIGN=top >
<A NAME="E7E1883"></A>
<P>Varchar(128)
<BR>not NULL
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E1884"></A>
<P>Table identifier.<A NAME="I124"></A><A NAME="I125"></A></TD>
</TR>
<TR>
<TD WIDTH=120 VALIGN=top >
<BLOCKQUOTE>
<P>GRANTOR
</BLOCKQUOTE></TD>
<TD WIDTH=86 VALIGN=top >
<A NAME="E7E1885"></A>
<P>Varchar(128)
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E1885"></A>
<P>Identifier of the user who granted the privilege; NULL if not applicable to the data source.</TD>
</TR>
<TR>
<TD WIDTH=120 VALIGN=top >
<BLOCKQUOTE>
<P>GRANTEE
</BLOCKQUOTE></TD>
<TD WIDTH=86 VALIGN=top >
<A NAME="E7E1886"></A>
<P>Varchar(128)
<BR>not NULL
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E1887"></A>
<P>Identifier of the user to whom the privilege was granted.<A NAME="I126"></A><A NAME="I127"></A><A NAME="I128"></A><A NAME="I129"></A><A NAME="I130"></A><A NAME="I131"></A></TD>
</TR>
<TR>
<TD WIDTH=120 VALIGN=top >
<BLOCKQUOTE>
<P>PRIVILEGE
</BLOCKQUOTE></TD>
<TD WIDTH=86 VALIGN=top >
<A NAME="E7E1888"></A>
<P>Varchar(128)
<BR>not NULL
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E1889"></A>
<P>Identifies the table privilege. May be one of the following or a data source&#150;specific privilege.
<BLOCKQUOTE>
<P>SELECT: The grantee is permitted to retrieve data for one or more columns of the table.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>INSERT: The grantee is permitted to insert new rows containing data for one or more columns into to the table.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>UPDATE: The grantee is permitted to update the data in one or more columns of the table.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>DELETE: The grantee is permitted to delete rows of data from the table.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>REFERENCES: The grantee is permitted to refer to one or more columns of the table within a constraint (for example, a unique, referential, or table check constraint).
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The scope of action permitted the grantee by a given table privilege is data source&#150;dependent. For example, the UPDATE privilege might permit the grantee to update all columns in a table on one data source and only those columns for which the grantor has the UPDATE privilege on another data source.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=120 VALIGN=top >
<BLOCKQUOTE>
<P>IS_GRANTABLE
</BLOCKQUOTE></TD>
<TD WIDTH=86 VALIGN=top >
<A NAME="E7E1890"></A>
<P>Varchar(3)
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E1890"></A>
<P>Indicates whether the grantee is permitted to grant the privilege to other users; &quot;YES&quot;, &quot;NO&quot;, or NULL if unknown or not applicable to the data source.</TD></TR></TABLE>
<A NAME="E11E353"></A>
<H3>
<FONT FACE="Arial">Code Example<A NAME="I132"></A></FONT></H3>
<BLOCKQUOTE>
<P>For a code example of a similar function, see <B>SQLColumns</B>.
</BLOCKQUOTE>
<A NAME="E11E354"></A>
<H3>
<FONT FACE="Arial">Related Functions</FONT></H3>

<TABLE WIDTH=800 >
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P><B>For information about</B>
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1891"></A>
<P>See</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Assigning storage for a column in a result set
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1892"></A>
<P><B>SQLBindCol</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Canceling statement processing
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1893"></A>
<P><B>SQLCancel</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Returning privileges for a column or columns
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1894"></A>
<P><B>SQLColumnPrivileges</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Returning the columns in a table or tables
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1895"></A>
<P><B>SQLColumns</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Fetching a block of data or scrolling through a result set
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1896"></A>
<P><B>SQLExtendedFetch</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Fetching a row of data
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1897"></A>
<P><B>SQLFetch</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Returning table statistics and indexes
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1898"></A>
<P><B>SQLStatistics</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Returning a list of tables in a data source
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1899"></A>
<P><B>SQLTables</B> (extension)</TD></TR></TABLE><A NAME="E10E108"></A>
<H2>
<FONT FACE="Arial"><B>SQL</B><B>Tables</B><B> (ODBC 1.0, Level 1)</B><A NAME="I133"></A></FONT></H2>
<BLOCKQUOTE>
<P><B>SQLTables</B> returns the list of table names stored in a specific data source. The driver returns the information as a result set.
</BLOCKQUOTE>
<A NAME="E11E355"></A>
<H3>
<FONT FACE="Arial">Syntax</FONT></H3>
<BLOCKQUOTE>
<P>RETCODE <B>SQLTables</B>(<I>hstmt</I>, <I>szTableQualifier</I>, <I>cbTableQualifier</I>, <I>szTableOwner</I>, <I>cbTableOwner</I>, <I>szTableName</I>, <I>cbTableName</I>, <I>szTableType</I>, <I>cbTableType</I>)<A NAME="I134"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The <B>SQLTables</B> function accepts the following arguments:
</BLOCKQUOTE>
<TABLE WIDTH=800 >
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P><B>Type</B>
</BLOCKQUOTE></TD>
<TD WIDTH=100 VALIGN=top >
<A NAME="E7E1900"></A>
<P>Argument
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1900"></A>
<P>Use
</TD><TD WIDTH=199 VALIGN=top >
<A NAME="E7E1900"></A>
<P>Description</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>HSTMT
</BLOCKQUOTE></TD>
<TD WIDTH=100 VALIGN=top >
<A NAME="E7E1901"></A>
<P><I>hstmt</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1901"></A>
<P>Input
</TD><TD WIDTH=199 VALIGN=top >
<A NAME="E7E1901"></A>
<P>Statement handle for retrieved results.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>UCHAR FAR *
</BLOCKQUOTE></TD>
<TD WIDTH=100 VALIGN=top >
<A NAME="E7E1902"></A>
<P><I>szTableQualifier</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1902"></A>
<P>Input
</TD><TD WIDTH=199 VALIGN=top >
<A NAME="E7E1902"></A>
<P>Qualifier name. If a driver supports qualifiers for some tables but not for others, such as when a driver retrieves data from different DBMSs, an empty string (&quot;&quot;) denotes those tables that do not have qualifiers.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>SWORD
</BLOCKQUOTE></TD>
<TD WIDTH=100 VALIGN=top >
<A NAME="E7E1903"></A>
<P><I>cbTableQualifier</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1903"></A>
<P>Input
</TD><TD WIDTH=199 VALIGN=top >
<A NAME="E7E1903"></A>
<P>Length of <I>szTableQualifier</I>.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>UCHAR FAR *
</BLOCKQUOTE></TD>
<TD WIDTH=100 VALIGN=top >
<A NAME="E7E1904"></A>
<P><I>szTableOwner</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1904"></A>
<P>Input
</TD><TD WIDTH=199 VALIGN=top >
<A NAME="E7E1904"></A>
<P>String search pattern for owner names. </TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>SWORD
</BLOCKQUOTE></TD>
<TD WIDTH=100 VALIGN=top >
<A NAME="E7E1905"></A>
<P><I>cbTableOwner</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1905"></A>
<P>Input
</TD><TD WIDTH=199 VALIGN=top >
<A NAME="E7E1905"></A>
<P>Length of <I>szTableOwner</I>.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>UCHAR FAR *
</BLOCKQUOTE></TD>
<TD WIDTH=100 VALIGN=top >
<A NAME="E7E1906"></A>
<P><I>szTableName</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1906"></A>
<P>Input
</TD><TD WIDTH=199 VALIGN=top >
<A NAME="E7E1906"></A>
<P>String search pattern for table names. If a driver supports owners for some tables but not for others, such as when the driver retrieves data from different DBMSs, an empty string (&quot;&quot;) denotes those tables that do not have owners.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>SWORD
</BLOCKQUOTE></TD>
<TD WIDTH=100 VALIGN=top >
<A NAME="E7E1907"></A>
<P><I>cbTableName</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1907"></A>
<P>Input
</TD><TD WIDTH=199 VALIGN=top >
<A NAME="E7E1907"></A>
<P>Length of <I>szTableName</I>.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>UCHAR FAR *
</BLOCKQUOTE></TD>
<TD WIDTH=100 VALIGN=top >
<A NAME="E7E1908"></A>
<P><I>szTableType</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1908"></A>
<P>Input
</TD><TD WIDTH=199 VALIGN=top >
<A NAME="E7E1908"></A>
<P>List of table types to match. </TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>SWORD
</BLOCKQUOTE></TD>
<TD WIDTH=100 VALIGN=top >
<A NAME="E7E1909"></A>
<P><I>cbTableType</I>
</TD><TD WIDTH=60 VALIGN=top >
<A NAME="E7E1909"></A>
<P>Input
</TD><TD WIDTH=199 VALIGN=top >
<A NAME="E7E1909"></A>
<P>Length of <I>szTableType</I>.</TD></TR></TABLE>
<A NAME="E11E356"></A>
<H3>
<FONT FACE="Arial">Returns<A NAME="I135"></A></FONT></H3>
<BLOCKQUOTE>
<P>SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR or SQL_INVALID_HANDLE.
</BLOCKQUOTE>
<A NAME="E11E357"></A>
<H3>
<FONT FACE="Arial">Diagnostics<A NAME="I136"></A></FONT></H3>
<BLOCKQUOTE>
<P>When <B>SQLTables</B> returns SQL_ERROR or SQL_SUCCESS_WITH_INFO, an associated SQLSTATE value may be obtained by calling <B>SQLError</B>. The following table lists the SQLSTATE values commonly returned by <B>SQLTables </B>and explains each one in the context of this function; the notation &quot;(DM)&quot; precedes the descriptions of SQLSTATEs returned by the Driver Manager. The return code associated with each SQLSTATE value is SQL_ERROR, unless noted otherwise.
</BLOCKQUOTE>
<TABLE WIDTH=800 >
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P><B>SQLSTATE</B>
</BLOCKQUOTE></TD>
<TD WIDTH=133 VALIGN=top >
<A NAME="E7E1910"></A>
<P>Error
</TD><TD WIDTH=226 VALIGN=top >
<A NAME="E7E1910"></A>
<P>Description</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>01000
</BLOCKQUOTE></TD>
<TD WIDTH=133 VALIGN=top >
<A NAME="E7E1911"></A>
<P>General warning
</TD><TD WIDTH=226 VALIGN=top >
<A NAME="E7E1911"></A>
<P>Driver-specific informational message. (Function returns SQL_SUCCESS_WITH_INFO.)</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>08S01
</BLOCKQUOTE></TD>
<TD WIDTH=133 VALIGN=top >
<A NAME="E7E1912"></A>
<P>Communication link failure
</TD><TD WIDTH=226 VALIGN=top >
<A NAME="E7E1912"></A>
<P>The communication link between the driver and the data source to which the driver was connected failed before the function completed processing.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>24000
</BLOCKQUOTE></TD>
<TD WIDTH=133 VALIGN=top >
<A NAME="E7E1913"></A>
<P>Invalid cursor state
</TD><TD WIDTH=226 VALIGN=top >
<A NAME="E7E1913"></A>
<P>(DM) A cursor was open on the <I>hstmt</I> and <B>SQLFetch</B> or <B>SQLExtendedFetch</B> had been called.
<BLOCKQUOTE>
<P>A cursor was open on the <I>hstmt</I> but <B>SQLFetch</B> or <B>SQLExtendedFetch</B> had not been called.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>IM001
</BLOCKQUOTE></TD>
<TD WIDTH=133 VALIGN=top >
<A NAME="E7E1914"></A>
<P>Driver does not support this function
</TD><TD WIDTH=226 VALIGN=top >
<A NAME="E7E1914"></A>
<P>(DM) The driver associated with the <I>hstmt</I> does not support the function.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1000
</BLOCKQUOTE></TD>
<TD WIDTH=133 VALIGN=top >
<A NAME="E7E1915"></A>
<P>General error
</TD><TD WIDTH=226 VALIGN=top >
<A NAME="E7E1915"></A>
<P>An error occurred for which there was no specific SQLSTATE and for which no implementation-specific SQLSTATE was defined. The error message returned by <B>SQLError</B> in the argument <I>szErrorMsg</I> describes the error and its cause.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1001
</BLOCKQUOTE></TD>
<TD WIDTH=133 VALIGN=top >
<A NAME="E7E1916"></A>
<P>Memory allocation failure
</TD><TD WIDTH=226 VALIGN=top >
<A NAME="E7E1916"></A>
<P>The driver was unable to allocate memory required to support execution or completion of the function.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1008
</BLOCKQUOTE></TD>
<TD WIDTH=133 VALIGN=top >
<A NAME="E7E1917"></A>
<P>Operation canceled
</TD><TD WIDTH=226 VALIGN=top >
<A NAME="E7E1917"></A>
<P>Asynchronous processing was enabled for the <I>hstmt</I>. The function was called and before it completed execution, <B>SQLCancel</B> was called on the <I>hstmt</I>. Then the function was called again on the <I>hstmt</I>.
<BLOCKQUOTE>
<P>The function was called and, before it completed execution, <B>SQLCancel</B> was called on the <I>hstmt</I> from a different thread in a multithreaded application.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1010
</BLOCKQUOTE></TD>
<TD WIDTH=133 VALIGN=top >
<A NAME="E7E1918"></A>
<P>Function sequence error
</TD><TD WIDTH=226 VALIGN=top >
<A NAME="E7E1918"></A>
<P>(DM) An asynchronously executing function (not this one) was called for the <I>hstmt</I> and was still executing when this function was called.
<BLOCKQUOTE>
<P>(DM) <B>SQLExecute</B>, <B>SQLExecDirect</B>, or <B>SQLSetPos</B> was called for the <I>hstmt</I> and returned SQL_NEED_DATA. This function was called before data was sent for all data-at-execution parameters or columns.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1090
</BLOCKQUOTE></TD>
<TD WIDTH=133 VALIGN=top >
<A NAME="E7E1919"></A>
<P>Invalid string or buffer length
</TD><TD WIDTH=226 VALIGN=top >
<A NAME="E7E1919"></A>
<P>(DM) The value of one of the name length arguments was less than 0, but not equal to SQL_NTS.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top ><BR></TD>
<TD WIDTH=133 VALIGN=top ><BR></TD>
<TD WIDTH=226 VALIGN=top >
<BLOCKQUOTE>
<P>The<B> </B>value of one of the name length arguments exceeded the maximum length value for the corresponding qualifier or name.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1C00
</BLOCKQUOTE></TD>
<TD WIDTH=133 VALIGN=top >
<A NAME="E7E1920"></A>
<P>Driver not capable
</TD><TD WIDTH=226 VALIGN=top >
<A NAME="E7E1920"></A>
<P>A table qualifier was specified and the driver or data source does not support qualifiers.
<BLOCKQUOTE>
<P>A table owner was specified and the driver or data source does not support owners.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=93 VALIGN=top ><BR></TD>
<TD WIDTH=133 VALIGN=top ><BR></TD>
<TD WIDTH=226 VALIGN=top >
<BLOCKQUOTE>
<P>A string search pattern was specified for the table owner or table name and the data source does not support search patterns for one or more of those arguments.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The combination of the current settings of the SQL_CONCURRENCY and SQL_CURSOR_TYPE statement options was not supported by the driver or data source.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1T00
</BLOCKQUOTE></TD>
<TD WIDTH=133 VALIGN=top >
<A NAME="E7E1921"></A>
<P>Timeout expired
</TD><TD WIDTH=226 VALIGN=top >
<A NAME="E7E1921"></A>
<P>The timeout period expired before the data source returned the requested result set. The timeout period is set through <B>SQLSetStmtOption</B>, SQL_QUERY_TIMEOUT.</TD></TR></TABLE>
<A NAME="E11E358"></A>
<H3>
<FONT FACE="Arial">Comments<A NAME="I137"></A></FONT></H3>
<BLOCKQUOTE>
<P><B>SQLTables</B> lists all tables in the requested range. A user may or may not have SELECT privileges to any of these tables. To check accessibility, an application can:<A NAME="I138"></A>
</BLOCKQUOTE>
<UL>
<BLOCKQUOTE>
<LI>Call <B>SQLGetInfo</B> and check the SQL_ACCESSIBLE_TABLES info value.<A NAME="I139"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<LI>Call <B>SQLTablePrivileges</B> to check the privileges for each table.<A NAME="I140"></A>
</BLOCKQUOTE></UL>
<BLOCKQUOTE>
<P>Otherwise, the application must be able to handle a situation where the user selects a table for which SELECT privileges are not granted.<A NAME="I141"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The <I>szTableOwner</I> and <I>szTableName</I> arguments accept search patterns. For more information about valid search patterns, see &quot;Search Pattern Arguments&quot; earlier in this chapter.<A NAME="I142"></A><A NAME="I143"></A><A NAME="I144"></A><A NAME="I145"></A><A NAME="I146"></A><A NAME="I147"></A><A NAME="I148"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>To support enumeration of qualifiers, owners, and table types, <B>SQLTables</B> defines the following special semantics for the <I>szTableQualifier</I>, <I>szTableOwner</I>, <I>szTableName</I>, and <I>szTableType</I> arguments:<A NAME="I149"></A><A NAME="I150"></A>
</BLOCKQUOTE>
<UL>
<BLOCKQUOTE>
<LI>If <I>szTableQualifier</I> is a single percent character (%) and <I>szTableOwner</I> and <I>szTableName</I> are empty strings, then the result set contains a list of valid qualifiers for the data source. (All columns except the TABLE_QUALIFIER column contain NULLs.)<A NAME="I151"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<LI>If <I>szTableOwner</I> is a single percent character (%) and <I>szTableQualifier</I> and <I>szTableName</I> are empty strings, then the result set contains a list of valid owners for the data source. (All columns except the TABLE_OWNER column contain NULLs.)<A NAME="I152"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<LI>If <I>szTableType</I> is a single percent character (%) and <I>szTableQualifier</I>, <I>szTableOwner</I>, and <I>szTableName</I> are empty strings, then the result set contains a list of valid table types for the data source. (All columns except the TABLE_TYPE column contain NULLs.)<A NAME="I153"></A>
</BLOCKQUOTE></UL>
<BLOCKQUOTE>
<P>If <I>szTableType</I> is not an empty string, it must contain a list of comma-separated, values for the types of interest; each value may be enclosed in single quotes (') or unquoted. For example, &quot;'TABLE','VIEW'&quot; or &quot;TABLE, VIEW&quot;. If the data source does not support a specified table type, <B>SQLTables</B> does not return any results for that type.<A NAME="I154"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P><B>SQLTables</B> returns the results as a standard result set, ordered by TABLE_TYPE, TABLE_QUALIFIER, TABLE_OWNER, and TABLE_NAME. The following table lists the columns in the result set.<A NAME="I155"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<NOTE>Note <B>SQLTables</B> might not return all qualifiers, owners, or tables. For example, an Xbase driver, for which a qualifier is a directory, might only return the current directory instead of all directories on the system. It might also only return files (tables) in the current directory. Applications can use any valid qualifier, owner, or table, regardless of whether it is returned by <B>SQLTables</B>.<A NAME="I156"></A></NOTE>
<HR ALIGN=CENTER>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The lengths of VARCHAR columns shown in the table are maximums; the actual lengths depend on the data source. To determine the actual lengths of the TABLE_QUALIFIER, TABLE_OWNER, and TABLE_NAME columns, an application can call <B>SQLGetInfo</B> with the SQL_MAX_QUALIFIER_NAME_LEN, SQL_MAX_OWNER_NAME_LEN, and SQL_MAX_TABLE_NAME_LEN options.
</BLOCKQUOTE>
<TABLE WIDTH=800 >
<TR>
<TD WIDTH=120 VALIGN=top >
<BLOCKQUOTE>
<P><B>Column Name</B>
</BLOCKQUOTE></TD>
<TD WIDTH=86 VALIGN=top >
<A NAME="E7E1922"></A>
<P>Data Type
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E1922"></A>
<P>Comments</TD>
</TR>
<TR>
<TD WIDTH=120 VALIGN=top >
<BLOCKQUOTE>
<P>TABLE_QUALIFIER
</BLOCKQUOTE></TD>
<TD WIDTH=86 VALIGN=top >
<A NAME="E7E1923"></A>
<P>Varchar(128)
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E1923"></A>
<P>Table qualifier identifier; NULL if not applicable to the data source. If a driver supports qualifiers for some tables but not for others, such as when the driver retrieves data from different DBMSs, it returns an empty string (&quot;&quot;) for those tables that do not have qualifiers.</TD>
</TR>
<TR>
<TD WIDTH=120 VALIGN=top >
<BLOCKQUOTE>
<P>TABLE_OWNER
</BLOCKQUOTE></TD>
<TD WIDTH=86 VALIGN=top >
<A NAME="E7E1924"></A>
<P>Varchar(128)
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E1924"></A>
<P>Table owner identifier; NULL if not applicable to the data source. If a driver supports owners for some tables but not for others, such as when the driver retrieves data from different DBMSs, it returns an empty string (&quot;&quot;) for those tables that do not have owners.<A NAME="I157"></A></TD>
</TR>
<TR>
<TD WIDTH=120 VALIGN=top >
<BLOCKQUOTE>
<P>TABLE_NAME
</BLOCKQUOTE></TD>
<TD WIDTH=86 VALIGN=top >
<A NAME="E7E1925"></A>
<P>Varchar(128)
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E1925"></A>
<P>Table identifier.<A NAME="I158"></A><A NAME="I159"></A><A NAME="I160"></A><A NAME="I161"></A><A NAME="I162"></A><A NAME="I163"></A><A NAME="I164"></A></TD>
</TR>
<TR>
<TD WIDTH=120 VALIGN=top >
<BLOCKQUOTE>
<P>TABLE_TYPE
</BLOCKQUOTE></TD>
<TD WIDTH=86 VALIGN=top >
<A NAME="E7E1926"></A>
<P>Varchar(128)
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E1926"></A>
<P>Table type identifier; one of the following: &quot;TABLE&quot;, &quot;VIEW&quot;, &quot;SYSTEM TABLE&quot;, &quot;GLOBAL TEMPORARY&quot;, &quot;LOCAL TEMPORARY&quot;, &quot;ALIAS&quot;, &quot;SYNONYM&quot; or a data source &#150; specific type identifier.</TD>
</TR>
<TR>
<TD WIDTH=120 VALIGN=top >
<BLOCKQUOTE>
<P>REMARKS
</BLOCKQUOTE></TD>
<TD WIDTH=86 VALIGN=top >
<A NAME="E7E1927"></A>
<P>Varchar(254)
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E1927"></A>
<P>A description of the table.</TD></TR></TABLE>
<A NAME="E11E359"></A>
<H3>
<FONT FACE="Arial">Code Example<A NAME="I165"></A></FONT></H3>
<BLOCKQUOTE>
<P>For a code example of a similar function, see <B>SQLColumns</B>.
</BLOCKQUOTE>
<A NAME="E11E360"></A>
<H3>
<FONT FACE="Arial">Related Functions</FONT></H3>

<TABLE WIDTH=800 >
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P><B>For information about</B>
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1928"></A>
<P>See</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Assigning storage for a column in a result set
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1929"></A>
<P><B>SQLBindCol</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Canceling statement processing
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1930"></A>
<P><B>SQLCancel</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Returning privileges for a column or columns
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1931"></A>
<P><B>SQLColumnPrivileges</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Returning the columns in a table or tables
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1932"></A>
<P><B>SQLColumns</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Fetching a block of data or scrolling through a result set
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1933"></A>
<P><B>SQLExtendedFetch</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Fetching a row of data
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1934"></A>
<P><B>SQLFetch</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Returning table statistics and indexes
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1935"></A>
<P><B>SQLStatistics</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Returning privileges for a table or tables
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1936"></A>
<P><B>SQLTablePrivileges</B> (extension)</TD></TR></TABLE><A NAME="E7E1936"></A>
<A NAME="E10E109"></A>
<H2>
<FONT FACE="Arial"><B>SQLTransact</B><B> (ODBC 1.0, Core)</B><A NAME="I166"></A></FONT></H2>
<BLOCKQUOTE>
<P><B>SQLTransact</B> requests a commit or rollback operation for all active operations on all <I>hstmts</I> associated with a connection. <B>SQLTransact</B> can also request that a commit or rollback operation be performed for all connections associated with the <I>henv</I>.
</BLOCKQUOTE>
<A NAME="E11E361"></A>
<H3>
<FONT FACE="Arial">Syntax</FONT></H3>
<BLOCKQUOTE>
<P>RETCODE <B>SQLTransact</B>(<I>henv</I>, <I>hdbc</I>, <I>fType</I>)<A NAME="I167"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The <B>SQLTransact</B> function accepts the following arguments.
</BLOCKQUOTE>
<TABLE WIDTH=800 >
<TR>
<TD WIDTH=66 VALIGN=top >
<BLOCKQUOTE>
<P><B>Type</B>
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1937"></A>
<P>Argument
</TD><TD WIDTH=73 VALIGN=top >
<A NAME="E7E1937"></A>
<P>Use
</TD><TD WIDTH=219 VALIGN=top >
<A NAME="E7E1937"></A>
<P>Description</TD>
</TR>
<TR>
<TD WIDTH=66 VALIGN=top >
<BLOCKQUOTE>
<P>HENV
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1938"></A>
<P><I>henv</I>
</TD><TD WIDTH=73 VALIGN=top >
<A NAME="E7E1938"></A>
<P>Input
</TD><TD WIDTH=219 VALIGN=top >
<A NAME="E7E1938"></A>
<P>Environment handle.</TD>
</TR>
<TR>
<TD WIDTH=66 VALIGN=top >
<BLOCKQUOTE>
<P>HDBC
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1939"></A>
<P><I>hdbc</I>
</TD><TD WIDTH=73 VALIGN=top >
<A NAME="E7E1939"></A>
<P>Input
</TD><TD WIDTH=219 VALIGN=top >
<A NAME="E7E1939"></A>
<P>Connection handle.</TD>
</TR>
<TR>
<TD WIDTH=66 VALIGN=top >
<BLOCKQUOTE>
<P>UWORD
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E1940"></A>
<P><I>fType</I>
</TD><TD WIDTH=73 VALIGN=top >
<A NAME="E7E1940"></A>
<P>Input
</TD><TD WIDTH=219 VALIGN=top >
<A NAME="E7E1940"></A>
<P>One of the following two values:
<BLOCKQUOTE>
<P>SQL_COMMIT
<BR>SQL_ROLLBACK</TD></TR></BLOCKQUOTE></TABLE>
<A NAME="E11E362"></A>
<H3>
<FONT FACE="Arial">Returns<A NAME="I168"></A></FONT></H3>
<BLOCKQUOTE>
<P>SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.
</BLOCKQUOTE>
<A NAME="E11E363"></A>
<H3>
<FONT FACE="Arial">Diagnostics<A NAME="I169"></A></FONT></H3>
<BLOCKQUOTE>
<P>When <B>SQLTransact </B>returns SQL_ERROR or SQL_SUCCESS_WITH_INFO, an associated SQLSTATE value may be obtained by calling <B>SQLError</B>. The following table lists the SQLSTATE values commonly returned by <B>SQLTransact </B>and explains each one in the context of this function; the notation &quot;(DM)&quot; precedes the descriptions of SQLSTATEs returned by the Driver Manager. The return code associated with each SQLSTATE value is SQL_ERROR, unless noted otherwise.
</BLOCKQUOTE>
<TABLE WIDTH=800 >
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P><B>SQLSTATE</B>
</BLOCKQUOTE></TD>
<TD WIDTH=133 VALIGN=top >
<A NAME="E7E1941"></A>
<P>Error
</TD><TD WIDTH=233 VALIGN=top >
<A NAME="E7E1941"></A>
<P>Description</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>01000
</BLOCKQUOTE></TD>
<TD WIDTH=133 VALIGN=top >
<A NAME="E7E1942"></A>
<P>General warning
</TD><TD WIDTH=233 VALIGN=top >
<A NAME="E7E1942"></A>
<P>Driver-specific informational message. (Function returns SQL_SUCCESS_WITH_INFO.)</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>08003
</BLOCKQUOTE></TD>
<TD WIDTH=133 VALIGN=top >
<A NAME="E7E1943"></A>
<P>Connection not open
</TD><TD WIDTH=233 VALIGN=top >
<A NAME="E7E1943"></A>
<P>(DM) The <I>hdbc</I> was not in a connected state.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>08007
</BLOCKQUOTE></TD>
<TD WIDTH=133 VALIGN=top >
<A NAME="E7E1944"></A>
<P>Connection failure during transaction
</TD><TD WIDTH=233 VALIGN=top >
<A NAME="E7E1944"></A>
<P>The connection associated with the <I>hdbc</I> failed during the execution of the function and it cannot be determined whether the requested <B>COMMIT</B> or <B>ROLLBACK</B> occurred before the failure.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>IM001
</BLOCKQUOTE></TD>
<TD WIDTH=133 VALIGN=top >
<A NAME="E7E1945"></A>
<P>Driver does not support this function
</TD><TD WIDTH=233 VALIGN=top >
<A NAME="E7E1945"></A>
<P>(DM) The driver associated with the <I>hdbc</I> does not support the function.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>S1000
</BLOCKQUOTE></TD>
<TD WIDTH=133 VALIGN=top >
<A NAME="E7E1946"></A>
<P>General error
</TD><TD WIDTH=233 VALIGN=top >
<A NAME="E7E1946"></A>
<P>An error occurred for which there was no specific SQLSTATE and for which no implementation-specific SQLSTATE was defined. The error message returned by <B>SQLError</B> in the argument <I>szErrorMsg</I> describes the error and its cause.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>S1001
</BLOCKQUOTE></TD>
<TD WIDTH=133 VALIGN=top >
<A NAME="E7E1947"></A>
<P>Memory allocation failure
</TD><TD WIDTH=233 VALIGN=top >
<A NAME="E7E1947"></A>
<P>The driver was unable to allocate memory required to support execution or completion of the function.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>S1010
</BLOCKQUOTE></TD>
<TD WIDTH=133 VALIGN=top >
<A NAME="E7E1948"></A>
<P>Function sequence error
</TD><TD WIDTH=233 VALIGN=top >
<A NAME="E7E1948"></A>
<P>(DM) An asynchronously executing function was called for an <I>hstmt</I> associated with the <I>hdbc</I> and was still executing when <B>SQLTransact</B> was called.
<BLOCKQUOTE>
<P>(DM) <B>SQLExecute</B>, <B>SQLExecDirect</B>, or <B>SQLSetPos</B> was called for an <I>hstmt</I> associated with the <I>hdbc</I> and returned SQL_NEED_DATA. This function was called before data was sent for all data-at-execution parameters or columns.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>S1012
</BLOCKQUOTE></TD>
<TD WIDTH=133 VALIGN=top >
<A NAME="E7E1949"></A>
<P>Invalid transaction operation code
</TD><TD WIDTH=233 VALIGN=top >
<A NAME="E7E1949"></A>
<P>(DM) The value specified for the argument <I>fType</I> was neither SQL_COMMIT nor SQL_ROLLBACK.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>S1C00
</BLOCKQUOTE></TD>
<TD WIDTH=133 VALIGN=top >
<A NAME="E7E1950"></A>
<P>Driver not capable
</TD><TD WIDTH=233 VALIGN=top >
<A NAME="E7E1950"></A>
<P>The driver or data source does not support the <B>ROLLBACK</B> operation.</TD></TR></TABLE>
<A NAME="E11E364"></A>
<H3>
<FONT FACE="Arial">Comments<A NAME="I170"></A><A NAME="I171"></A><A NAME="I172"></A><A NAME="I173"></A><A NAME="I174"></A><A NAME="I175"></A><A NAME="I176"></A></FONT></H3>
<BLOCKQUOTE>
<P>If <I>hdbc</I> is SQL_NULL_HDBC and <I>henv</I> is a valid environment handle, then the Driver Manager will attempt to commit or roll back transactions on all <I>hdbcs</I> that are in a connected state. The Driver Manager calls <B>SQLTransact</B> in the driver associated with each <I>hdbc</I>. The Driver Manager will return SQL_SUCCESS only if it receives SQL_SUCCESS for each <I>hdbc</I>. If the Driver Manager receives SQL_ERROR on one or more <I>hdbcs</I>, it will return SQL_ERROR to the application. To determine which connection(s) failed during the commit or rollback operation, the application can call <B>SQLError</B> for each <I>hdbc</I>.<A NAME="I177"></A><A NAME="I178"></A><A NAME="I179"></A><A NAME="I180"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<NOTE>Note The Driver Manager does not simulate a global transaction across all <I>hdbcs</I> and therefore does not use two-phase commit protocols.<A NAME="I181"></A></NOTE>
<HR ALIGN=CENTER>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If <I>hdbc</I> is a valid connection handle, <I>henv</I> is ignored and the Driver Manager calls <B>SQLTransact</B> in the driver for the <I>hdbc</I>.<A NAME="I182"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If <I>hdbc</I> is SQL_NULL_HDBC and <I>henv</I> is SQL_NULL_HENV, <B>SQLTransact</B> returns SQL_INVALID_HANDLE.<A NAME="I183"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If <I>fType</I> is SQL_COMMIT, <B>SQLTransact</B> issues a commit request for all active operations on any <I>hstmt</I> associated with an affected <I>hdbc</I>. If <I>fType</I> is SQL_ROLLBACK, <B>SQLTransact</B> issues a rollback request for all active operations on any <I>hstmt</I> associated with an affected <I>hdbc</I>. If no transactions are active, <B>SQLTransact</B> returns SQL_SUCCESS with no effect on any data sources.<A NAME="I184"></A><A NAME="I185"></A><A NAME="I186"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If the driver is in manual-commit mode (by calling <B>SQLSetConnectOption</B> with the SQL_AUTOCOMMIT option set to zero), a new transaction is implicitly started when an SQL statement that can be contained within a transaction is executed against the current data source.<A NAME="I187"></A><A NAME="I188"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>To determine how transaction operations affect cursors, an application calls <B>SQLGetInfo</B> with the SQL_CURSOR_ROLLBACK_BEHAVIOR and SQL_CURSOR_COMMIT_BEHAVIOR options.<A NAME="I189"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If the SQL_CURSOR_ROLLBACK_BEHAVIOR or SQL_CURSOR_COMMIT_BEHAVIOR value equals SQL_CB_DELETE, <B>SQLTransact</B> closes and deletes all open cursors on all <I>hstmts</I> associated with the <I>hdbc</I> and discards all pending results. <B>SQLTransact</B> leaves any <I>hstmt</I> present in an allocated (unprepared) state; the application can reuse them for subsequent SQL requests or can call <B>SQLFreeStmt</B> to deallocate them.<A NAME="I190"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If the SQL_CURSOR_ROLLBACK_BEHAVIOR or SQL_CURSOR_COMMIT_BEHAVIOR value equals SQL_CB_CLOSE, <B>SQLTransact</B> closes all open cursors on all <I>hstmts</I> associated with the <I>hdbc</I>. <B>SQLTransact</B> leaves any <I>hstmt</I> present in a prepared state; the application can call <B>SQLExecute</B> for an <I>hstmt</I> associated with the <I>hdbc</I> without first calling <B>SQLPrepare</B>.<A NAME="I191"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If the SQL_CURSOR_ROLLBACK_BEHAVIOR or SQL_CURSOR_COMMIT_BEHAVIOR value equals SQL_CB_PRESERVE, <B>SQLTransact</B> does not affect open cursors associated with the <I>hdbc</I>. Cursors remain at the row they pointed to prior to the call to <B>SQLTransact</B>.<A NAME="I192"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>For drivers and data sources that support transactions, calling <B>SQLTransact</B> with either SQL_COMMIT or SQL_ROLLBACK when no transaction is active will return SQL_SUCCESS (indicating that there is no work to be committed or rolled back) and have no effect on the data source.<A NAME="I193"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>Drivers or data sources that do not support transactions (<B>SQLGetInfo</B> <I>fOption</I> SQL_TXN_CAPABLE is 0) are effectively always in autocommit mode. Therefore, calling <B>SQLTransact</B> with SQL_COMMIT will return SQL_SUCCESS. However, calling <B>SQLTransact</B> with SQL_ROLLBACK will result in SQLSTATE S1C00 (Driver not capable), indicating that a rollback can never be performed.
</BLOCKQUOTE>
<A NAME="E11E365"></A>
<H3>
<FONT FACE="Arial">Code Example<A NAME="I194"></A></FONT></H3>
<BLOCKQUOTE>
<P>See <B>SQLParamOptions</B>.
</BLOCKQUOTE>
<A NAME="E11E366"></A>
<H3>
<FONT FACE="Arial">Related Functions</FONT></H3>

<TABLE WIDTH=800 >
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P><B>For information about</B>
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1951"></A>
<P>See</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Returning information about a driver or data source
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1952"></A>
<P><B>SQLGetInfo</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Freeing a statement handle
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E1953"></A>
<P><B>SQLFreeStmt</B></TD></TR></TABLE><P ALIGN=CENTER>
<A HREF="prguid23.htm" TARGET="_self"><IMG SRC="graprev.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Previous Page"></A>
<A HREF="httoc.htm" TARGET="_self"><IMG SRC="gratoc.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="TOC"></A>
<A HREF="htindex.htm" TARGET="_self"><IMG SRC="graindex.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Index"></A>
<A HREF="prguid25.htm" TARGET="_self"><IMG SRC="granext.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Next Page"></A>

<center><p><font SIZE=-2>Copyright &copy; 1992-1997 Solid Information Technology Ltd All rights reserved.</font></p></center>
</BODY></HTML>