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
|
<HTML>
<HEAD>
<TITLE>prguide.htm</TITLE>
<LINK REL="ToC" HREF="httoc.htm">
<LINK REL="Index" HREF="htindex.htm">
<LINK REL="Next" HREF="prguid18.htm">
<LINK REL="Previous" HREF="prguid16.htm"></HEAD>
<BODY BGCOLOR="#FFFFFF">
<P ALIGN=CENTER>
<A HREF="prguid16.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="prguid18.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="#E74E4" >SQLDriverConnect (ODBC 1.0, Level 1)</A>
<UL>
<LI>
<A HREF="#E11E134" >Syntax</A>
<LI>
<A HREF="#E11E135" >Returns</A>
<LI>
<A HREF="#E11E136" >Diagnostics</A>
<LI>
<A HREF="#E11E137" >Comments</A>
<UL>
<LI>
<A HREF="#E12E47" >Connection Strings</A>
<LI>
<A HREF="#E12E48" >Driver Manager Guidelines</A>
<LI>
<A HREF="#E12E49" >Driver Guidelines</A>
<LI>
<A HREF="#E12E50" >Connection Options</A></UL>
<LI>
<A HREF="#E11E138" >Related Functions</A></UL>
<LI>
<A HREF="#E10E76" >SQLDrivers (ODBC 2.0, Level 2)</A>
<UL>
<LI>
<A HREF="#E11E139" >Syntax</A>
<LI>
<A HREF="#E11E140" >Returns</A>
<LI>
<A HREF="#E11E141" >Diagnostics</A>
<LI>
<A HREF="#E11E142" >Comments</A>
<LI>
<A HREF="#E11E143" >Related Functions</A></UL>
<LI>
<A HREF="#E10E77" >SQLError (ODBC 1.0, Core)</A>
<UL>
<LI>
<A HREF="#E11E144" >Syntax</A>
<LI>
<A HREF="#E11E145" >Returns</A>
<LI>
<A HREF="#E11E146" >Diagnostics</A>
<LI>
<A HREF="#E11E147" >Comments</A>
<LI>
<A HREF="#E11E148" >Related Functions</A></UL>
<LI>
<A HREF="#E10E78" >SQLExecDirect (ODBC 1.0, Core)</A>
<UL>
<LI>
<A HREF="#E11E149" >Syntax</A>
<LI>
<A HREF="#E11E150" >Returns</A>
<LI>
<A HREF="#E11E151" >Diagnostics</A>
<LI>
<A HREF="#E11E152" >Comments</A>
<LI>
<A HREF="#E11E153" >Code Example</A>
<LI>
<A HREF="#E11E154" >Related Functions</A></UL>
<LI>
<A HREF="#E10E79" >SQLExecute (ODBC 1.0, Core)</A>
<UL>
<LI>
<A HREF="#E11E155" >Syntax</A>
<LI>
<A HREF="#E11E156" >Returns</A>
<LI>
<A HREF="#E11E157" >Diagnostics</A>
<LI>
<A HREF="#E11E158" >Comments</A>
<LI>
<A HREF="#E11E159" >Code Example</A>
<LI>
<A HREF="#E11E160" >Related Functions</A></UL></UL></UL>
<HR ALIGN=CENTER>
<A NAME="E74E4"></A>
<H2>
<FONT FACE="Arial"><B>SQLDriverConnect (ODBC 1.0, Level 1)</B><A NAME="I2"></A></FONT></H2>
<BLOCKQUOTE>
<P><B>SQLDriverConnect</B> is an alternative to <B>SQLConnect</B>. It supports data sources that require more connection information than the three arguments in <B>SQLConnect</B>; dialog boxes to prompt the user for all connection information; and data sources that are not defined in the ODBC.INI file or registry.<A NAME="I3"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P><B>SQLDriverConnect</B> provides the following connection options:<A NAME="I4"></A>
</BLOCKQUOTE>
<UL>
<BLOCKQUOTE>
<LI>Establish a connection using a connection string that contains the data source name, one or more user IDs, one or more passwords, and other information required by the data source.<A NAME="I5"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<LI>Establish a connection using a partial connection string or no additional information; in this case, the Driver Manager and the driver can each prompt the user for connection information.<A NAME="I6"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<LI>Establish a connection to a data source that is not defined in the ODBC.INI file or registry. If the application supplies a partial connection string, the driver can prompt the user for connection information.<A NAME="I7"></A>
</BLOCKQUOTE></UL>
<BLOCKQUOTE>
<P>Once a connection is established, <B>SQLDriverConnect</B> returns the completed connection string. The application can use this string for subsequent connection requests.
</BLOCKQUOTE>
<A NAME="E11E134"></A>
<H3>
<FONT FACE="Arial">Syntax</FONT></H3>
<BLOCKQUOTE>
<P><A NAME="I8"></A>RETCODE<A NAME="I9"></A> <B>SQLDriverConnect</B>(<I>hdbc</I>, <I>hwnd</I>, <I>szConnStrIn</I>, <I>cbConnStrIn</I>, <I>szConnStrOut</I>, <I>cbConnStrOutMax</I>, <I>pcbConnStrOut</I>, <I>fDriverCompletion</I>)<A NAME="I10"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The <B>SQLDriverConnect</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="E7E596"></A>
<P>Argument
</TD><TD WIDTH=57 VALIGN=top >
<A NAME="E7E596"></A>
<P>Use
</TD><TD WIDTH=195 VALIGN=top >
<A NAME="E7E596"></A>
<P>Description</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>HDBC
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E597"></A>
<P><I>hdbc</I>
</TD><TD WIDTH=57 VALIGN=top >
<A NAME="E7E597"></A>
<P>Input
</TD><TD WIDTH=195 VALIGN=top >
<A NAME="E7E597"></A>
<P>Connection handle.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>HWND
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E598"></A>
<P><I>hwnd</I>
</TD><TD WIDTH=57 VALIGN=top >
<A NAME="E7E598"></A>
<P>Input
</TD><TD WIDTH=195 VALIGN=top >
<A NAME="E7E598"></A>
<P>Window handle. The application can pass the handle of the parent window, if applicable, or a null pointer if either the window handle is not applicable or if <B>SQLDriverConnect</B> will not present any dialog boxes.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>UCHAR FAR *
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E599"></A>
<P><I>szConnStrIn</I>
</TD><TD WIDTH=57 VALIGN=top >
<A NAME="E7E599"></A>
<P>Input
</TD><TD WIDTH=195 VALIGN=top >
<A NAME="E7E599"></A>
<P>A full connection string (see the syntax in "Comments"), a partial connection string, or an empty string.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>SWORD
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E600"></A>
<P><I>cbConnStrIn</I>
</TD><TD WIDTH=57 VALIGN=top >
<A NAME="E7E600"></A>
<P>Input
</TD><TD WIDTH=195 VALIGN=top >
<A NAME="E7E600"></A>
<P>Length of <I>szConnStrIn</I>.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>UCHAR FAR *
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E601"></A>
<P><I>szConnStrOut</I>
</TD><TD WIDTH=57 VALIGN=top >
<A NAME="E7E601"></A>
<P>Output
</TD><TD WIDTH=195 VALIGN=top >
<A NAME="E7E601"></A>
<P>Pointer to storage for the completed connection string. Upon successful connection to the target data source, this buffer contains the completed connection string. Applications should allocate at least 255 bytes for this buffer.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>SWORD
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E602"></A>
<P><I>cbConnStrOutMax</I>
</TD><TD WIDTH=57 VALIGN=top >
<A NAME="E7E602"></A>
<P>Input
</TD><TD WIDTH=195 VALIGN=top >
<A NAME="E7E602"></A>
<P>Maximum length of the <I>szConnStrOut</I> buffer.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>SWORD FAR *
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E603"></A>
<P><I>pcbConnStrOut</I>
</TD><TD WIDTH=57 VALIGN=top >
<A NAME="E7E603"></A>
<P>Output
</TD><TD WIDTH=195 VALIGN=top >
<A NAME="E7E603"></A>
<P>Pointer to the total number of bytes (excluding the null termination byte) available to return in <I>szConnStrOut</I>. If the number of bytes available to return is greater than or equal to <I>cbConnStrOutMax</I>, the completed connection string in <I>szConnStrOut</I> is truncated to <I>cbConnStrOutMax </I>– 1 bytes.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>UWORD
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E604"></A>
<P><I>fDriverCompletion</I>
</TD><TD WIDTH=57 VALIGN=top >
<A NAME="E7E604"></A>
<P>Input
</TD><TD WIDTH=195 VALIGN=top >
<A NAME="E7E604"></A>
<P>Flag which indicates whether Driver Manager or driver must prompt for more connection information:
<BLOCKQUOTE>
<P>SQL_DRIVER_PROMPT,
<BR>SQL_DRIVER_COMPLETE, SQL_DRIVER_COMPLETE_REQUIRED, or SQL_DRIVER_NOPROMPT.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>(See "Comments," for additional information.)</TD></TR></BLOCKQUOTE></TABLE>
<A NAME="E11E135"></A>
<H3>
<FONT FACE="Arial">Returns<A NAME="I11"></A></FONT></H3>
<BLOCKQUOTE>
<P>SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_NO_DATA_FOUND, SQL_ERROR, or SQL_INVALID_HANDLE.
</BLOCKQUOTE>
<A NAME="E11E136"></A>
<H3>
<FONT FACE="Arial">Diagnostics<A NAME="I12"></A></FONT></H3>
<BLOCKQUOTE>
<P>When <B>SQLDriverConnect</B> returns either 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>SQLDriverConnect </B>and explains each one in the context of this function; the notation "(DM)" 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=120 VALIGN=top >
<A NAME="E7E605"></A>
<P>Error
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E605"></A>
<P>Description</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>01000
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E606"></A>
<P>General warning
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E606"></A>
<P>Driver-specific informational message. (Function returns SQL_SUCCESS_WITH_INFO.)</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>01004
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E607"></A>
<P>Data truncated
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E607"></A>
<P>The buffer <I>szConnStrOut</I> was not large enough to return the entire connection string, so the connection string was truncated. The argument <I>pcbConnStrOut</I> contains the length of the untruncated connection string. (Function returns SQL_SUCCESS_WITH_INFO.)</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>01S00
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E608"></A>
<P>Invalid connection string attribute
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E608"></A>
<P>An invalid attribute keyword was specified in the connection string (<I>szConnStrIn</I>) but the driver was able to connect to the data source anyway. (Function returns SQL_SUCCESS_WITH_INFO.)</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>08001
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E609"></A>
<P>Unable to connect to data source
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E609"></A>
<P>The driver was unable to establish a connection with the data source.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>08002
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E610"></A>
<P>Connection in use
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E610"></A>
<P>(DM) The specified <I>hdbc</I> had already been used to establish a connection with a data source and the connection was still open.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>08004
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E611"></A>
<P>Data source rejected establishment of connection
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E611"></A>
<P>The data source rejected the establishment of the connection for implementation-defined reasons.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>08S01
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E612"></A>
<P>Communication link failure
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E612"></A>
<P>The communication link between the driver and the data source to which the driver was attempting to connect failed before the function completed processing.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>28000
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E613"></A>
<P>Invalid authorization specification
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E613"></A>
<P>Either the user identifier or the authorization string or both as specified in the connection string (<I>szConnStrIn</I>) violated restrictions defined by the data source.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>IM001
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E614"></A>
<P>Driver does not support this function
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E614"></A>
<P>(DM) The driver corresponding to the specified data source name does not support the function.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>IM002
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E615"></A>
<P>Data source not found and no default driver specified
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E615"></A>
<P>(DM) The data source name specified in the connection string (<I>szConnStrIn</I>) was not found in the ODBC.INI file or registry and there was no default driver specification.
<BLOCKQUOTE>
<P>(DM) The ODBC.INI file could not be found.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>IM003
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E616"></A>
<P>Specified driver could not be loaded
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E616"></A>
<P>(DM) The driver listed in the data source specification in the ODBC.INI file or registry, or specified by the <B>DRIVER</B> keyword, was not found or could not be loaded for some other reason.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>IM004
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E617"></A>
<P>Driver’s SQLAllocEnv failed
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E617"></A>
<P>(DM) During <B>SQLDriverConnect</B>, the Driver Manager called the driver’s <B>SQLAllocEnv</B> function and the driver returned an error.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>IM005
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E618"></A>
<P>Driver’s SQLAllocConnect failed
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E618"></A>
<P>(DM) During <B>SQLDriverConnect</B>, the Driver Manager called the driver’s <B>SQLAllocConnect</B> function and the driver returned an error.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>IM006
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E619"></A>
<P>Driver’s SQLSetConnectOption failed
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E619"></A>
<P>(DM) During <B>SQLDriverConnect</B>, the Driver Manager called the driver’s <B>SQLSetConnectOption</B> function and the driver returned an error.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>IM007
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E620"></A>
<P>No data source or driver specified; dialog prohibited
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E620"></A>
<P>No data source name or driver was specified in the connection string and <I>fDriverCompletion</I> was SQL_DRIVER_NOPROMPT.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>IM008
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E621"></A>
<P>Dialog failed
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E621"></A>
<P>(DM) The Driver Manager attempted to display the SQL Data Sources dialog box and failed.
<BLOCKQUOTE>
<P>The driver attempted to display its login dialog box and failed.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>IM009
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E622"></A>
<P>Unable to load translation DLL
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E622"></A>
<P>The driver was unable to load the translation DLL that was specified for the data source or for the connection.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>IM010
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E623"></A>
<P>Data source name too long
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E623"></A>
<P>(DM) The attribute value for the DSN keyword was longer than SQL_MAX_DSN_LENGTH characters.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>IM011
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E624"></A>
<P>Driver name too long
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E624"></A>
<P>(DM) The attribute value for the DRIVER keyword was longer than 255 characters.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>IM012
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E625"></A>
<P>DRIVER keyword syntax error
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E625"></A>
<P>(DM) The keyword-value pair for the DRIVER keyword contained a syntax error.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>S1000
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E626"></A>
<P>General error
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E626"></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=120 VALIGN=top >
<A NAME="E7E627"></A>
<P>Memory allocation failure
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E627"></A>
<P>The Driver Manager was unable to allocate memory required to support execution or completion of the function.
<BLOCKQUOTE>
<P>The driver was unable to allocate memory required to support execution or completion of the function.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>S1090
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E628"></A>
<P>Invalid string or buffer length
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E628"></A>
<P>(DM) The value specified for argument <I>cbConnStrIn</I> was less than 0 and was not equal to SQL_NTS.
<BLOCKQUOTE>
<P>(DM) The value specified for argument <I>cbConnStrOutMax</I> was less than 0.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>S1110
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E629"></A>
<P>Invalid driver completion
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E629"></A>
<P>(DM) The value specified for the argument <I>fDriverCompletion</I> was not equal to SQL_DRIVER_PROMPT, SQL_DRIVER_COMPLETE, SQL_DRIVER_COMPLETE_REQUIRED or SQL_DRIVER_NOPROMPT.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>S1T00
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E630"></A>
<P>Timeout expired
</TD><TD WIDTH=246 VALIGN=top >
<A NAME="E7E630"></A>
<P>The timeout period expired before the connection to the data source completed. The timeout period is set through <B>SQLSetConnectOption</B>, SQL_LOGIN_TIMEOUT.</TD></TR></TABLE>
<A NAME="E11E137"></A>
<H3>
<FONT FACE="Arial">Comments</FONT></H3>
<BLOCKQUOTE>
<A NAME="E12E47"></A>
<H4>
<FONT>Connection Strings<A NAME="I13"></A><A NAME="I14"></A><A NAME="I15"></A><A NAME="I16"></A><A NAME="I17"></A><A NAME="I18"></A></FONT></H4>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>A connection string has the following syntax:<A NAME="I19"></A><A NAME="I20"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P><I>connection-string</I> ::= <I>empty-string</I>[;] | <I>attribute</I>[;] |
<BR> <I>attribute</I>; <I>connection-string</I>
<BR><I>empty-string</I> ::=
<BR><I>attribute</I> ::= <I>attribute-keyword</I>=<I>attribute-value</I> | DRIVER={<I>attribute-value</I>}
<BR>(The braces ({}) are literal; the application must specify them.)
<BR><I>attribute-keyword</I> ::= DSN | UID | PWD |
<BR> <I>driver-defined-attribute-keyword</I>
<BR><I>attribute-value</I> ::= <I>character-string</I>
<BR><I>driver-defined-attribute-keyword</I> ::= <I>identifier</I><A NAME="I21"></A><A NAME="I22"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>where <I>character-string</I> has zero or more characters; <I>identifier</I> has one or more characters; <I>attribute-keyword</I> is case insensitive; <I>attribute-value</I> may be case sensitive; and the value of the <B>DSN</B> keyword does not consist solely of blanks. Because of connection string and initialization file grammar, keywords and attribute values that contain the characters <B>[]{}(),;?*=!@</B> should be avoided. Because of the registry grammar, keywords and data source names cannot contain the backslash (\) character.<A NAME="I23"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<NOTE>Note The <B>DRIVER</B> keyword was introduced in ODBC 2.0 and is not supported by ODBC 1.0 drivers.<A NAME="I24"></A></NOTE>
<HR ALIGN=CENTER>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The connection string may include any number of driver-defined keywords. Because the <B>DRIVER</B> keyword does not use information from the ODBC.INI file or registry, the driver must define enough keywords so that a driver can connect to a data source using only the information in the connection string. (For more information, see "Driver Guidelines," later in this section.) The driver defines which keywords are required in order to connect to the data source.<A NAME="I25"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If any keywords are repeated in the connection string, the driver uses the value associated with the first occurrence of the keyword. If the <B>DSN</B> and <B>DRIVER</B> keywords are included in the same connection string, the Driver Manager and the driver use whichever keyword appears first. The following table describes the attribute values of the <B>DSN</B>, <B>DRIVER</B>, <B>UID</B>, and <B>PWD</B> keywords.
</BLOCKQUOTE>
<TABLE WIDTH=800 >
<TR>
<TD WIDTH=126 VALIGN=top >
<BLOCKQUOTE>
<P><B>Keyword</B>
</BLOCKQUOTE></TD>
<TD WIDTH=326 VALIGN=top >
<A NAME="E7E631"></A>
<P>Attribute value description</TD>
</TR>
<TR>
<TD WIDTH=126 VALIGN=top >
<BLOCKQUOTE>
<P><B>DSN</B>
</BLOCKQUOTE></TD>
<TD WIDTH=326 VALIGN=top >
<A NAME="E7E632"></A>
<P>Name of a data source as returned by <B>SQLDataSources</B> or the data sources dialog box of <B>SQLDriverConnect</B>.</TD>
</TR>
<TR>
<TD WIDTH=126 VALIGN=top >
<BLOCKQUOTE>
<P><B>DRIVER</B>
</BLOCKQUOTE></TD>
<TD WIDTH=326 VALIGN=top >
<A NAME="E7E633"></A>
<P>Description of the driver as returned by the <B>SQLDrivers</B> function.</TD>
</TR>
<TR>
<TD WIDTH=126 VALIGN=top >
<BLOCKQUOTE>
<P><B>UID</B>
</BLOCKQUOTE></TD>
<TD WIDTH=326 VALIGN=top >
<A NAME="E7E634"></A>
<P>A user ID.</TD>
</TR>
<TR>
<TD WIDTH=126 VALIGN=top >
<BLOCKQUOTE>
<P><B>PWD</B>
</BLOCKQUOTE></TD>
<TD WIDTH=326 VALIGN=top >
<A NAME="E7E635"></A>
<P>The password corresponding to the user ID, or an empty string if there is no password for the user ID (PWD=;).</TD></TR></TABLE>
<BLOCKQUOTE>
<A NAME="E12E48"></A>
<H4>
<FONT>Driver Manager Guidelines<A NAME="I26"></A><A NAME="I27"></A></FONT></H4>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The Driver Manager constructs a connection string to pass to the driver in the <I>szConnStrIn</I> argument of the driver’s <B>SQLDriverConnect</B> function. Note that the Driver Manager does not modify the <I>szConnStrIn</I> argument passed to it by the application.<A NAME="I28"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If the connection string specified by the application contains the <B>DSN</B> keyword or does not contain either the <B>DSN</B> or <B>DRIVER</B> keywords, the action of the Driver Manager is based on the value of the <I>fDriverCompletion</I> argument:<A NAME="I29"></A><A NAME="I30"></A>
</BLOCKQUOTE>
<UL>
<BLOCKQUOTE>
<LI>SQL_DRIVER_PROMPT: The Driver Manager displays the Data Sources dialog box. It constructs a connection string from the data source name returned by the dialog box and any other keywords passed to it by the application. If the data source name returned by the dialog box is empty, the Driver Manager specifies the keyword-value pair DSN=Default.<A NAME="I31"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<LI>SQL_DRIVER_COMPLETE or SQL_DRIVER_COMPLETE_REQUIRED: If the connection string specified by the application includes the <B>DSN</B> keyword, the Driver Manager copies the connection string specified by the application. Otherwise, it takes the same actions as it does when <I>fDriverCompletion</I> is SQL_DRIVER_PROMPT.<A NAME="I32"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<LI>SQL_DRIVER_NOPROMPT: The Driver Manager copies the connection string specified by the application.<A NAME="I33"></A>
</BLOCKQUOTE></UL>
<BLOCKQUOTE>
<P>If the connection string specified by the application contains the <B>DRIVER</B> keyword, the Driver Manager copies the connection string specified by the application.<A NAME="I34"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>Using the connection string it has constructed, the Driver Manager determines which driver to use, loads that driver, and passes the connection string it has constructed to the driver; for more information about the interaction of the Driver Manager and the driver, see the "Comments" section in <B>SQLConnect</B>. If the connection string contains the <B>DSN</B> keyword or does not contain either the <B>DSN</B> or the <B>DRIVER</B> keyword, the Driver Manager determines which driver to use as follows:<A NAME="I35"></A>
</BLOCKQUOTE>
<UL>
<BLOCKQUOTE>
<LI>1. If the connection string contains the <B>DSN</B> keyword, the Driver Manager retrieves the driver associated with the data source from the ODBC.INI file or registry.<A NAME="I36"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<LI>2. If the connection string does not contain the <B>DSN</B> keyword or the data source is not found, the Driver Manager retrieves the driver associated with the Default data source from the ODBC.INI file or registry. However, the Driver Manager does not change the value of the <B>DSN</B> keyword in the connection string.<A NAME="I37"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<LI>3. If the data source is not found and the Default data source is not found, the Driver Manager returns SQL_ERROR with SQLSTATE IM002 (Data source not found and no default driver specified).
</BLOCKQUOTE></UL>
<BLOCKQUOTE>
<A NAME="E12E49"></A>
<H4>
<FONT>Driver Guidelines<A NAME="I38"></A></FONT></H4>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The driver checks if the connection string passed to it by the Driver Manager contains the <B>DSN</B> or <B>DRIVER</B> keyword. If the connection string contains the <B>DRIVER</B> keyword, the driver cannot retrieve information about the data source from the ODBC.INI file or registry. If the connection string contains the <B>DSN</B> keyword or does not contain either the <B>DSN</B> or the <B>DRIVER</B> keyword, the driver can retrieve information about the data source from the ODBC.INI file or registry as follows:<A NAME="I39"></A>
</BLOCKQUOTE>
<UL>
<BLOCKQUOTE>
<LI>1. If the connection string contains the <B>DSN</B> keyword, the driver retrieves the information for the specified data source.<A NAME="I40"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<LI>2. If the connection string does not contain the <B>DSN</B> keyword or the specified data source is not found, the driver retrieves the information for the Default data source.<A NAME="I41"></A>
</BLOCKQUOTE></UL>
<BLOCKQUOTE>
<P>The driver uses any information it retrieves from the ODBC.INI file or registry to augment the information passed to it in the connection string. If the information in the ODBC.INI file or registry duplicates information in the connection string, the driver uses the information in the connection string.<A NAME="I42"></A><A NAME="I43"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>Based on the value of <I>fDriverCompletion</I>, the driver prompts the user for connection information, such as the user ID and password, and connects to the data source:<A NAME="I44"></A>
</BLOCKQUOTE>
<UL>
<BLOCKQUOTE>
<LI>SQL_DRIVER_PROMPT: The driver displays a dialog box, using the values from the connection string and ODBC.INI file or registry (if any) as initial values. When the user exits the dialog box, the driver connects to the data source. It also constructs a connection string from the value of the <B>DSN</B> or <B>DRIVER</B> keyword in <I>szConnStrIn</I> and the information returned from the dialog box. It places this connection string in the buffer referenced by <I>szConnStrOut</I>.<A NAME="I45"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<LI>SQL_DRIVER_COMPLETE or SQL_DRIVER_COMPLETE_REQUIRED: If the connection string contains enough information, and that information is correct, the driver connects to the data source and copies <I>szConnStrIn</I> to <I>szConnStrOut</I>. If any information is missing or incorrect, the driver takes the same actions as it does when <I>fDriverCompletion</I> is SQL_DRIVER_PROMPT, except that if <I>fDriverCompletion</I> is SQL_DRIVER_COMPLETE_REQUIRED, the driver disables the controls for any information not required to connect to the data source.<A NAME="I46"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<LI>SQL_DRIVER_NOPROMPT: If the connection string contains enough information, the driver connects to the data source and copies <I>szConnStrIn</I> to <I>szConnStrOut</I>. Otherwise, the driver returns SQL_ERROR for <B>SQLDriverConnect</B>.<A NAME="I47"></A>
</BLOCKQUOTE></UL>
<BLOCKQUOTE>
<P>On successful connection to the data source, the driver also sets <I>pcbConnStrOut</I> to the length of <I>szConnStrOut</I>.<A NAME="I48"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If the user cancels a dialog box presented by the Driver Manager or the driver, <B>SQLDriverConnect</B> returns SQL_NO_DATA_FOUND.<A NAME="I49"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>For information about how the Driver Manager and the driver interact during the connection process, see <B>SQLConnect</B>.<A NAME="I50"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If a driver supports <B>SQLDriverConnect</B>, the driver keyword section of the ODBC.INF file for the driver must contain the <B>ConnectFunctions</B> keyword with the second character set to "Y".
</BLOCKQUOTE>
<BLOCKQUOTE>
<A NAME="E12E50"></A>
<H4>
<FONT>Connection Options<A NAME="I51"></A><A NAME="I52"></A><A NAME="I53"></A><A NAME="I54"></A><A NAME="I55"></A><A NAME="I56"></A></FONT></H4>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The SQL_LOGIN_TIMEOUT connection option, set using <B>SQLSetConnectOption</B>, defines the number of seconds to wait for a login request to complete before returning to the application. If the user is prompted to complete the connection string, a waiting period for each login request begins after the user has dismissed each dialog box.<A NAME="I57"></A><A NAME="I58"></A><A NAME="I59"></A><A NAME="I60"></A><A NAME="I61"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The driver opens the connection in SQL_MODE_READ_WRITE access mode by default. To set the access mode to SQL_MODE_READ_ONLY, the application must call <B>SQLSetConnectOption</B> with the SQL_ACCESS_MODE option prior to calling <B>SQLDriverConnect</B>.<A NAME="I62"></A><A NAME="I63"></A><A NAME="I64"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If a default translation DLL is specified in the ODBC.INI file or registry for the data source, the driver loads it. A different translation DLL can be loaded by calling <B>SQLSetConnectOption</B> with the SQL_TRANSLATE_DLL option. A translation option can be specified by calling <B>SQLSetConnectOption</B> with the SQL_TRANSLATE_OPTION option.
</BLOCKQUOTE>
<A NAME="E11E138"></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="E7E636"></A>
<P>See</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Allocating a connection handle
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E637"></A>
<P><B>SQLAllocConnect</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Discovering and enumerating values required to connect to a data source
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E638"></A>
<P><B>SQLBrowseConnect</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Connecting to a data source
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E639"></A>
<P><B>SQLConnect</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Disconnecting from a data source
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E640"></A>
<P><B>SQLDisconnect</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Returning driver descriptions and attributes
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E641"></A>
<P><B>SQLDrivers</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Freeing a connection handle
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E642"></A>
<P><B>SQLFreeConnect</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Setting a connection option
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E643"></A>
<P><B>SQLSetConnectOption</B> (extension)</TD></TR></TABLE><A NAME="E10E76"></A>
<H2>
<FONT FACE="Arial"><B>SQLDrivers (ODBC 2.0, Level 2)</B><A NAME="I65"></A></FONT></H2>
<BLOCKQUOTE>
<P><B>SQLDrivers</B> lists driver descriptions and driver attribute keywords. This function is implemented solely by the Driver Manager.
</BLOCKQUOTE>
<A NAME="E11E139"></A>
<H3>
<FONT FACE="Arial">Syntax</FONT></H3>
<BLOCKQUOTE>
<P>RETCODE <B>SQLDrivers</B>(<I>henv</I>, <I>fDirection</I>, <I>szDriverDesc</I>, <I>cbDriverDescMax</I>, <I>pcbDriverDesc</I>, <I>szDriverAttributes</I>, <I>cbDrvrAttrMax</I>, <I>pcbDrvrAttr</I>)<A NAME="I66"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The <B>SQLDrivers</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="E7E644"></A>
<P>Argument
</TD><TD WIDTH=66 VALIGN=top >
<A NAME="E7E644"></A>
<P>Use
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E644"></A>
<P>Description</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>HENV
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E645"></A>
<P><I>henv</I>
</TD><TD WIDTH=66 VALIGN=top >
<A NAME="E7E645"></A>
<P>Input
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E645"></A>
<P>Environment handle.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>UWORD
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E646"></A>
<P><I>fDirection</I>
</TD><TD WIDTH=66 VALIGN=top >
<A NAME="E7E646"></A>
<P>Input
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E646"></A>
<P>Determines whether the Driver Manager fetches the next driver description in the list (SQL_FETCH_NEXT) or whether the search starts from the beginning of the list (SQL_FETCH_FIRST).</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>UCHAR FAR *
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E647"></A>
<P><I>szDriverDesc</I>
</TD><TD WIDTH=66 VALIGN=top >
<A NAME="E7E647"></A>
<P>Output
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E647"></A>
<P>Pointer to storage for the driver description.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>SWORD
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E648"></A>
<P><I>cbDriverDescMax</I>
</TD><TD WIDTH=66 VALIGN=top >
<A NAME="E7E648"></A>
<P>Input
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E648"></A>
<P>Maximum length of the <I>szDriverDesc</I> buffer.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>SWORD FAR *
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E649"></A>
<P><I>pcbDriverDesc</I>
</TD><TD WIDTH=66 VALIGN=top >
<A NAME="E7E649"></A>
<P>Output
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E649"></A>
<P>Total number of bytes (excluding the null termination byte) available to return in <I>szDriverDesc</I>. If the number of bytes available to return is greater than or equal to <I>cbDriverDescMax</I>, the driver description in <I>szDriverDesc</I> is truncated to <I>cbDriverDescMax </I>– 1 bytes.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>UCHAR FAR *
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E650"></A>
<P><I>szDriverAttributes</I>
</TD><TD WIDTH=66 VALIGN=top >
<A NAME="E7E650"></A>
<P>Output
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E650"></A>
<P>Pointer to storage for the list of driver attribute value pairs (see "Comments").</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>SWORD
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E651"></A>
<P><I>cbDrvrAttrMax</I>
</TD><TD WIDTH=66 VALIGN=top >
<A NAME="E7E651"></A>
<P>Input
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E651"></A>
<P>Maximum length of the <I>szDriverAttributes</I> buffer.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>SWORD FAR *
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E652"></A>
<P><I>pcbDrvrAttr</I>
</TD><TD WIDTH=66 VALIGN=top >
<A NAME="E7E652"></A>
<P>Output
</TD><TD WIDTH=180 VALIGN=top >
<A NAME="E7E652"></A>
<P>Total number of bytes (excluding the null termination byte) available to return in <I>szDriverAttributes</I>. If the number of bytes available to return is greater than or equal to <I>cbDrvrAttrMax</I>, the list of attribute value pairs in <I>szDriverAttributes</I> is truncated to <I>cbDrvrAttrMax </I>– 1 bytes.</TD></TR></TABLE>
<A NAME="E11E140"></A>
<H3>
<FONT FACE="Arial">Returns<A NAME="I67"></A></FONT></H3>
<BLOCKQUOTE>
<P>SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_NO_DATA_FOUND, SQL_ERROR, or SQL_INVALID_HANDLE.
</BLOCKQUOTE>
<A NAME="E11E141"></A>
<H3>
<FONT FACE="Arial">Diagnostics<A NAME="I68"></A></FONT></H3>
<BLOCKQUOTE>
<P>When <B>SQLDrivers</B> returns either 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>SQLDrivers </B>and explains each one in the context of this function; the notation "(DM)" 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="E7E653"></A>
<P>Error
</TD><TD WIDTH=240 VALIGN=top >
<A NAME="E7E653"></A>
<P>Description</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>01000
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E654"></A>
<P>General warning
</TD><TD WIDTH=240 VALIGN=top >
<A NAME="E7E654"></A>
<P>(DM) Driver Manager–specific informational message. (Function returns SQL_SUCCESS_WITH_INFO.)</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>01004
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E655"></A>
<P>Data truncated
</TD><TD WIDTH=240 VALIGN=top >
<A NAME="E7E655"></A>
<P>(DM) The buffer <I>szDriverDesc</I> was not large enough to return the entire driver description, so the description was truncated. The argument <I>pcbDriverDesc</I> contains the length of the entire driver description. (Function returns SQL_SUCCESS_WITH_INFO.)</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top ><BR></TD>
<TD WIDTH=120 VALIGN=top ><BR></TD>
<TD WIDTH=240 VALIGN=top >
<BLOCKQUOTE>
<P>(DM) The buffer <I>szDriverAttributes</I> was not large enough to return the entire list of attribute value pairs, so the list was truncated. The argument <I>pcbDrvrAttr</I> contains the length of the untruncated list of attribute value pairs. (Function returns SQL_SUCCESS_WITH_INFO.)</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1000
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E656"></A>
<P>General error
</TD><TD WIDTH=240 VALIGN=top >
<A NAME="E7E656"></A>
<P>(DM) 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="E7E657"></A>
<P>Memory allocation failure
</TD><TD WIDTH=240 VALIGN=top >
<A NAME="E7E657"></A>
<P>(DM) The Driver Manager was unable to allocate memory required to support execution or completion of the function.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1090
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E658"></A>
<P>Invalid string or buffer length
</TD><TD WIDTH=240 VALIGN=top >
<A NAME="E7E658"></A>
<P>(DM) The value specified for argument <I>cbDriverDescMax</I> was less than 0.
<BLOCKQUOTE>
<P>(DM) The value specified for argument <I>cbDrvrAttrMax</I> was less than 0 or equal to 1.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>S1103
</BLOCKQUOTE></TD>
<TD WIDTH=120 VALIGN=top >
<A NAME="E7E659"></A>
<P>Direction option out of range
</TD><TD WIDTH=240 VALIGN=top >
<A NAME="E7E659"></A>
<P>(DM) The value specified for the argument <I>fDirection</I> was not equal to SQL_FETCH_FIRST or SQL_FETCH_NEXT.</TD></TR></TABLE>
<A NAME="E11E142"></A>
<H3>
<FONT FACE="Arial">Comments<A NAME="I69"></A><A NAME="I70"></A></FONT></H3>
<BLOCKQUOTE>
<P><B>SQLDrivers</B> returns the driver description in the <I>szDriverDesc</I> argument. It returns additional information about the driver in the <I>szDriverAttributes</I> argument as a list of keyword-value pairs. Each pair is terminated with a null byte, and the entire list is terminated with a null byte (that is, two null bytes mark the end of the list). For example, a dBASE driver might return the following list of attributes ("\0" represents a null byte):
</BLOCKQUOTE>
<BLOCKQUOTE>
<PRE>
<FONT FACE="Courier New">FileUsage=1\0FileExtns=*.dbf\0\0<A NAME="I71"></A></FONT></PRE></BLOCKQUOTE>
<BLOCKQUOTE>
<P>If <I>szDriverAttributes</I> is not large enough to hold the entire list, the list is truncated, <B>SQLDrivers</B> returns SQLSTATE 01004 (Data truncated), and the length of the list (excluding the final null termination byte) is returned in <I>pcbDrvrAttr</I>.<A NAME="I72"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>Driver attribute keywords are added from the ODBC.INF file when the driver is installed.<A NAME="I73"></A><A NAME="I74"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>An application can call <B>SQLDrivers</B> multiple times to retrieve all driver descriptions. The Driver Manager retrieves this information from the ODBCINST.INI file or the registry. When there are no more driver descriptions, <B>SQLDrivers</B> returns SQL_NO_DATA_FOUND. If <B>SQLDrivers</B> is called with SQL_FETCH_NEXT immediately after it returns SQL_NO_DATA_FOUND, it returns the first driver description.<A NAME="I75"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If SQL_FETCH_NEXT is passed to <B>SQLDrivers</B> the very first time it is called, <B>SQLDrivers</B> returns the first data source name.<A NAME="I76"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>Because <B>SQLDrivers</B> is implemented in the Driver Manager, it is supported for all drivers regardless of a particular driver’s conformance level.
</BLOCKQUOTE>
<A NAME="E11E143"></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="E7E660"></A>
<P>See</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Discovering and listing values required to connect to a data source
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E661"></A>
<P><B>SQLBrowseConnect</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Connecting to a data source
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E662"></A>
<P><B>SQLConnect</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Returning data source names
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E663"></A>
<P><B>SQLDataSources</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Connecting to a data source using a connection string or dialog box
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E664"></A>
<P><B>SQLDriverConnect</B> (extension)</TD></TR></TABLE><A NAME="E10E77"></A>
<H2>
<FONT FACE="Arial"><B>SQLError</B><B> (ODBC 1.0, Core)</B><A NAME="I77"></A><A NAME="I78"></A></FONT></H2>
<BLOCKQUOTE>
<P><B>SQLError</B> returns error or status information.
</BLOCKQUOTE>
<A NAME="E11E144"></A>
<H3>
<FONT FACE="Arial">Syntax</FONT></H3>
<BLOCKQUOTE>
<P>RETCODE <B>SQLError</B>(<I>henv</I>, <I>hdbc</I>, <I>hstmt</I>, <I>szSqlState</I>, <I>pfNativeError</I>, <I>szErrorMsg</I>, <I>cbErrorMsgMax</I>, <I>pcbErrorMsg</I>)<A NAME="I79"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The <B>SQLError</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="E7E665"></A>
<P>Argument
</TD><TD WIDTH=74 VALIGN=top >
<A NAME="E7E665"></A>
<P>Use
</TD><TD WIDTH=185 VALIGN=top >
<A NAME="E7E665"></A>
<P>Description</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>HENV
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E666"></A>
<P><I>henv</I>
</TD><TD WIDTH=74 VALIGN=top >
<A NAME="E7E666"></A>
<P>Input
</TD><TD WIDTH=185 VALIGN=top >
<A NAME="E7E666"></A>
<P>Environment handle or SQL_NULL_HENV.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>HDBC
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E667"></A>
<P><I>hdbc</I>
</TD><TD WIDTH=74 VALIGN=top >
<A NAME="E7E667"></A>
<P>Input
</TD><TD WIDTH=185 VALIGN=top >
<A NAME="E7E667"></A>
<P>Connection handle or SQL_NULL_HDBC.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>HSTMT
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E668"></A>
<P><I>hstmt</I>
</TD><TD WIDTH=74 VALIGN=top >
<A NAME="E7E668"></A>
<P>Input
</TD><TD WIDTH=185 VALIGN=top >
<A NAME="E7E668"></A>
<P>Statement handle or SQL_NULL_HSTMT.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>UCHAR FAR *
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E669"></A>
<P><I>szSqlState</I>
</TD><TD WIDTH=74 VALIGN=top >
<A NAME="E7E669"></A>
<P>Output
</TD><TD WIDTH=185 VALIGN=top >
<A NAME="E7E669"></A>
<P>SQLSTATE as null-terminated string. For a list of SQLSTATEs, see Appendix A, "ODBC Error Codes."</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>SDWORD FAR *
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E670"></A>
<P><I>pfNativeError</I>
</TD><TD WIDTH=74 VALIGN=top >
<A NAME="E7E670"></A>
<P>Output
</TD><TD WIDTH=185 VALIGN=top >
<A NAME="E7E670"></A>
<P>Native error code (specific to the data source).</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>UCHAR FAR *
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E671"></A>
<P><I>szErrorMsg</I>
</TD><TD WIDTH=74 VALIGN=top >
<A NAME="E7E671"></A>
<P>Output
</TD><TD WIDTH=185 VALIGN=top >
<A NAME="E7E671"></A>
<P>Pointer to storage for the error message text.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>SWORD
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E672"></A>
<P><I>cbErrorMsgMax</I>
</TD><TD WIDTH=74 VALIGN=top >
<A NAME="E7E672"></A>
<P>Input
</TD><TD WIDTH=185 VALIGN=top >
<A NAME="E7E672"></A>
<P>Maximum length of the <I>szErrorMsg</I> buffer. This must be less than or equal to SQL_MAX_MESSAGE_
<BR>LENGTH – 1.</TD>
</TR>
<TR>
<TD WIDTH=100 VALIGN=top >
<BLOCKQUOTE>
<P>SWORD FAR *
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E673"></A>
<P><I>pcbErrorMsg</I>
</TD><TD WIDTH=74 VALIGN=top >
<A NAME="E7E673"></A>
<P>Output
</TD><TD WIDTH=185 VALIGN=top >
<A NAME="E7E673"></A>
<P>Pointer to the total number of bytes (excluding the null termination byte) available to return in <I>szErrorMsg</I>. If the number of bytes available to return is greater than or equal to <I>cbErrorMsgMax</I>, the error message text in <I>szErrorMsg</I> is truncated to <I>cbErrorMsgMax </I>
<BR>– 1 bytes.</TD></TR></TABLE>
<A NAME="E11E145"></A>
<H3>
<FONT FACE="Arial">Returns<A NAME="I80"></A></FONT></H3>
<BLOCKQUOTE>
<P>SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_NO_DATA_FOUND, SQL_ERROR, or SQL_INVALID_HANDLE.
</BLOCKQUOTE>
<A NAME="E11E146"></A>
<H3>
<FONT FACE="Arial">Diagnostics<A NAME="I81"></A></FONT></H3>
<BLOCKQUOTE>
<P><B>SQLError</B> does not post error values for itself. <B>SQLError</B> returns SQL_NO_DATA_FOUND when it is unable to retrieve any error information, (in which case <I>szSqlState</I> equals 00000). If <B>SQLError</B> cannot access error values for any reason that would normally return SQL_ERROR, <B>SQLError</B> returns SQL_ERROR but does not post any error values. If the buffer for the error message is too short, <B>SQLError</B> returns SQL_SUCCESS_WITH_INFO but, again, does not return a SQLSTATE value for <B>SQLError</B>.<A NAME="I82"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>To determine that a truncation occurred in the error message, an application can compare <I>cbErrorMsgMax</I> to the actual length of the message text written to <I>pcbErrorMsg</I>.
</BLOCKQUOTE>
<A NAME="E11E147"></A>
<H3>
<FONT FACE="Arial">Comments<A NAME="I83"></A></FONT></H3>
<BLOCKQUOTE>
<P>An application typically calls <B>SQLError</B> when a previous call to an ODBC function returns SQL_ERROR or SQL_SUCCESS_WITH_INFO. However, any ODBC function can post zero or more errors each time it is called, so an application can call <B>SQLError</B> after any ODBC function call.<A NAME="I84"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P><B>SQLError</B> retrieves an error from the data structure associated with the rightmost non-null handle argument. An application requests error information as follows:<A NAME="I85"></A>
</BLOCKQUOTE>
<UL>
<BLOCKQUOTE>
<LI>To retrieve errors associated with an environment, the application passes the corresponding <I>henv</I> and includes SQL_NULL_HDBC and SQL_NULL_HSTMT in <I>hdbc</I> and <I>hstmt</I>, respectively. The driver returns the error status of the ODBC function most recently called with the same <I>henv</I>.<A NAME="I86"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<LI>To retrieve errors associated with a connection, the application passes the corresponding <I>hdbc</I> plus an <I>hstmt</I> equal to SQL_NULL_HSTMT. In such a case, the driver ignores the <I>henv</I> argument. The driver returns the error status of the ODBC function most recently called with the <I>hdbc</I>.<A NAME="I87"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<LI>To retrieve errors associated with a statement, an application passes the corresponding <I>hstmt</I>. If the call to <B>SQLError</B> contains a valid <I>hstmt</I>, the driver ignores the <I>hdbc</I> and <I>henv</I> arguments. The driver returns the error status of the ODBC function most recently called with the <I>hstmt</I>.<A NAME="I88"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<LI>To retrieve multiple errors for a function call, an application calls <B>SQLError</B> multiple times. For each error, the driver returns SQL_SUCCESS and removes that error from the list of available errors.<A NAME="I89"></A>
</BLOCKQUOTE></UL>
<BLOCKQUOTE>
<P>When there is no additional information for the rightmost non-null handle, <B>SQLError</B> returns SQL_NO_DATA_FOUND. In this case, <I>szSqlState</I> equals 00000 (Success), <I>pfNativeError</I> is undefined, <I>pcbErrorMsg</I> equals 0, and <I>szErrorMsg</I> contains a single null termination byte (unless <I>cbErrorMsgMax</I> equals 0).<A NAME="I90"></A><A NAME="I91"></A><A NAME="I92"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The Driver Manager stores error information in its <I>henv</I>, <I>hdbc</I>, and <I>hstmt</I> structures. Similarly, the driver stores error information in its <I>henv</I>, <I>hdbc</I>, and <I>hstmt</I> structures. When the application calls <B>SQLError</B>, the Driver Manager checks if there are any errors in its structure for the specified handle. If there are errors for the specified handle, it returns the first error; if there are no errors, it calls <B>SQLError</B> in the driver.<A NAME="I93"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The Driver Manager can store up to 64 errors with an <I>henv</I> and its associated <I>hdbcs</I> and <I>hstmts</I>. When this limit is reached, the Driver Manager discards any subsequent errors posted on the Driver Manager’s <I>henv</I>, <I>hdbcs</I>, or <I>hstmts</I>. The number of errors that a driver can store is driver-dependent.<A NAME="I94"></A><A NAME="I95"></A><A NAME="I96"></A><A NAME="I97"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>An error is removed from the structure associated with a handle when <B>SQLError</B> is called for that handle and returns that error. All errors stored for a given handle are removed when that handle is used in a subsequent function call. For example, errors on an <I>hstmt</I> that were returned by <B>SQLExecDirect</B> are removed when <B>SQLExecDirect</B> or <B>SQLTables</B> is called with that <I>hstmt</I>. The errors stored on a given handle are not removed as the result of a call to a function using an associated handle of a different type. For example, errors on an <I>hdbc</I> that were returned by <B>SQLNativeSql</B> are not removed when <B>SQLError</B> or <B>SQLExecDirect</B> is called with an <I>hstmt</I> associated with that <I>hdbc</I>.<A NAME="I98"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>For more information about error codes, see Appendix A, "ODBC Error Codes."
</BLOCKQUOTE>
<A NAME="E11E148"></A>
<H3>
<FONT FACE="Arial">Related Functions<A NAME="I99"></A></FONT></H3>
<BLOCKQUOTE>
<P>None.
</BLOCKQUOTE>
<A NAME="E10E78"></A>
<H2>
<FONT FACE="Arial"><B>SQLExecDirect (ODBC 1.0, Core)</B><A NAME="I100"></A></FONT></H2>
<BLOCKQUOTE>
<P><B>SQLExecDirect</B> executes a preparable statement, using the current values of the parameter marker variables if any parameters exist in the statement. <B>SQLExecDirect</B> is the fastest way to submit an SQL statement for one-time execution.
</BLOCKQUOTE>
<A NAME="E11E149"></A>
<H3>
<FONT FACE="Arial">Syntax</FONT></H3>
<BLOCKQUOTE>
<P>RETCODE <B>SQLExecDirect</B>(<I>hstmt</I>, <I>szSqlStr</I>, <I>cbSqlStr</I>)<A NAME="I101"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The <B>SQLExecDirect</B> function uses the following arguments.
</BLOCKQUOTE>
<TABLE WIDTH=800 >
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P><B>Type</B>
</BLOCKQUOTE></TD>
<TD WIDTH=86 VALIGN=top >
<A NAME="E7E674"></A>
<P>Argument
</TD><TD WIDTH=73 VALIGN=top >
<A NAME="E7E674"></A>
<P>Use
</TD><TD WIDTH=199 VALIGN=top >
<A NAME="E7E674"></A>
<P>Description</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>HSTMT
</BLOCKQUOTE></TD>
<TD WIDTH=86 VALIGN=top >
<A NAME="E7E675"></A>
<P><I>hstmt</I>
</TD><TD WIDTH=73 VALIGN=top >
<A NAME="E7E675"></A>
<P>Input
</TD><TD WIDTH=199 VALIGN=top >
<A NAME="E7E675"></A>
<P>Statement handle.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>UCHAR FAR *
</BLOCKQUOTE></TD>
<TD WIDTH=86 VALIGN=top >
<A NAME="E7E676"></A>
<P><I>szSqlStr</I>
</TD><TD WIDTH=73 VALIGN=top >
<A NAME="E7E676"></A>
<P>Input
</TD><TD WIDTH=199 VALIGN=top >
<A NAME="E7E676"></A>
<P>SQL statement to be executed.</TD>
</TR>
<TR>
<TD WIDTH=93 VALIGN=top >
<BLOCKQUOTE>
<P>SDWORD
</BLOCKQUOTE></TD>
<TD WIDTH=86 VALIGN=top >
<A NAME="E7E677"></A>
<P><I>cbSqlStr</I>
</TD><TD WIDTH=73 VALIGN=top >
<A NAME="E7E677"></A>
<P>Input
</TD><TD WIDTH=199 VALIGN=top >
<A NAME="E7E677"></A>
<P>Length of <I>szSqlStr</I>.</TD></TR></TABLE>
<A NAME="E11E150"></A>
<H3>
<FONT FACE="Arial">Returns<A NAME="I102"></A></FONT></H3>
<BLOCKQUOTE>
<P>SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_NEED_DATA, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.
</BLOCKQUOTE>
<A NAME="E11E151"></A>
<H3>
<FONT FACE="Arial">Diagnostics<A NAME="I103"></A></FONT></H3>
<BLOCKQUOTE>
<P>When <B>SQLExecDirect</B> returns either 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>SQLExecDirect </B>and explains each one in the context of this function; the notation "(DM)" 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=106 VALIGN=top >
<A NAME="E7E678"></A>
<P>Error
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E678"></A>
<P>Description</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>01000
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E679"></A>
<P>General warning
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E679"></A>
<P>Driver-specific informational message. (Function returns SQL_SUCCESS_WITH_INFO.)</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>01004
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E680"></A>
<P>Data truncated
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E680"></A>
<P>The argument <I>szSqlStr</I> contained an SQL statement that contained a character or binary parameter or literal and the value exceeded the maximum length of the associated table column.
<BLOCKQUOTE>
<P>The argument <I>szSqlStr</I> contained an SQL statement that contained a numeric parameter or literal and the fractional part of the value was truncated.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The argument <I>szSqlStr</I> contained an SQL statement that contained a date or time parameter or literal and a timestamp value was truncated.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>01006
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E681"></A>
<P>Privilege not revoked
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E681"></A>
<P>The argument <I>szSqlStr</I> contained a <B>REVOKE</B> statement and the user did not have the specified privilege. (Function returns SQL_SUCCESS_WITH_INFO.)</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>01S03
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E682"></A>
<P>No rows updated or deleted
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E682"></A>
<P>The argument <I>szSqlStr</I> contained a positioned update or delete statement and no rows were updated or deleted. (Function returns SQL_SUCCESS_WITH_INFO.)</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>01S04
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E683"></A>
<P>More than one row updated or deleted
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E683"></A>
<P>The argument <I>szSqlStr</I> contained a positioned update or delete statement and more than one row was updated or deleted. (Function returns SQL_SUCCESS_WITH_INFO.)</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>07001
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E684"></A>
<P>Wrong number of parameters
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E684"></A>
<P>The number of parameters specified in <B>SQLBindParameter</B> was less than the number of parameters in the SQL statement contained in the argument <I>szSqlStr</I>.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>08S01
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E685"></A>
<P>Communication link failure
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E685"></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=86 VALIGN=top >
<BLOCKQUOTE>
<P>21S01
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E686"></A>
<P>Insert value list does not match column list
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E686"></A>
<P>The argument <I>szSqlStr</I> contained an <B>INSERT</B> statement and the number of values to be inserted did not match the degree of the derived table.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>21S02
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E687"></A>
<P>Degree of derived table does not match column list
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E687"></A>
<P>The argument <I>szSqlStr</I> contained a <B>CREATE </B><B>VIEW</B> statement and the number of names specified is not the same degree as the derived table defined by the query specification.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>22003
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E688"></A>
<P>Numeric value out of range
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E688"></A>
<P>The argument <I>szSqlStr</I> contained an SQL statement which contained a numeric parameter or literal and the value caused the whole (as opposed to fractional) part of the number to be truncated when assigned to the associated table column.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>22005
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E689"></A>
<P>Error in assignment
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E689"></A>
<P>The argument <I>szSqlStr</I> contained an SQL statement that contained a parameter or literal and the value was incompatible with the data type of the associated table column.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>22008
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E690"></A>
<P>Datetime field overflow
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E690"></A>
<P>The argument <I>szSqlStr</I> contained an SQL statement that contained a date, time, or timestamp parameter or literal and the value was, respectively, an invalid date, time, or timestamp.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>22012
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E691"></A>
<P>Division by zero
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E691"></A>
<P>The argument <I>szSqlStr</I> contained an SQL statement which contained an arithmetic expression which caused division by zero.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>23000
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E692"></A>
<P>Integrity constraint violation
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E692"></A>
<P>The argument <I>szSqlStr</I> contained an SQL statement which contained a parameter or literal. The parameter value was NULL for a column defined as NOT NULL in the associated table column, a duplicate value was supplied for a column constrained to contain only unique values, or some other integrity constraint was violated.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>24000
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E693"></A>
<P>Invalid cursor state
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E693"></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.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The argument <I>szSqlStr</I> contained a positioned update or delete statement and the cursor was positioned before the start of the result set or after the end of the result set.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>34000
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E694"></A>
<P>Invalid cursor name
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E694"></A>
<P>The argument <I>szSqlStr</I> contained a positioned update or delete statement and the cursor referenced by the statement being executed was not open.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>37000
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E695"></A>
<P>Syntax error or access violation
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E695"></A>
<P>The argument <I>szSqlStr</I> contained an SQL statement that was not preparable or contained a syntax error.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>40001
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E696"></A>
<P>Serialization failure
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E696"></A>
<P>The transaction to which the SQL statement contained in the argument <I>szSqlStr</I> belonged was terminated to prevent deadlock.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>42000
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E697"></A>
<P>Syntax error or access violation
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E697"></A>
<P>The user did not have permission to execute the SQL statement contained in the argument <I>szSqlStr</I>.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>IM001
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E698"></A>
<P>Driver does not support this function
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E698"></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>S0001
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E699"></A>
<P>Base table or view already exists
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E699"></A>
<P>The argument <I>szSqlStr</I> contained a <B>CREATE </B><B>TABLE</B> or <B>CREATE VIEW</B> statement and the table name or view name specified already exists.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>S0002
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E700"></A>
<P>Table or view not found
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E700"></A>
<P>The argument <I>szSqlStr</I> contained a <B>DROP </B><B>TABLE</B> or a <B>DROP VIEW</B> statement and the specified table name or view name did not exist.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top ><BR></TD>
<TD WIDTH=106 VALIGN=top ><BR></TD>
<TD WIDTH=260 VALIGN=top >
<BLOCKQUOTE>
<P>The argument <I>szSqlStr</I> contained an <B>ALTER </B><B>TABLE</B> statement and the specified table name did not exist.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=86 VALIGN=top ><BR></TD>
<TD WIDTH=106 VALIGN=top ><BR></TD>
<TD WIDTH=260 VALIGN=top >
<BLOCKQUOTE>
<P>The argument <I>szSqlStr</I> contained a <B>CREATE </B><B>VIEW</B> statement and a table name or view name defined by the query specification did not exist.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=86 VALIGN=top ><BR></TD>
<TD WIDTH=106 VALIGN=top ><BR></TD>
<TD WIDTH=260 VALIGN=top >
<BLOCKQUOTE>
<P>The argument <I>szSqlStr</I> contained a <B>CREATE </B><B>INDEX</B> statement and the specified table name did not exist.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=86 VALIGN=top ><BR></TD>
<TD WIDTH=106 VALIGN=top ><BR></TD>
<TD WIDTH=260 VALIGN=top >
<BLOCKQUOTE>
<P>The argument <I>szSqlStr</I> contained a <B>GRANT</B> or <B>REVOKE</B> statement and the specified table name or view name did not exist.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=86 VALIGN=top ><BR></TD>
<TD WIDTH=106 VALIGN=top ><BR></TD>
<TD WIDTH=260 VALIGN=top >
<BLOCKQUOTE>
<P>The argument <I>szSqlStr</I> contained a <B>SELECT</B> statement and a specified table name or view name did not exist.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=86 VALIGN=top ><BR></TD>
<TD WIDTH=106 VALIGN=top ><BR></TD>
<TD WIDTH=260 VALIGN=top >
<BLOCKQUOTE>
<P>The argument <I>szSqlStr</I> contained a <B>DELETE</B>, <B>INSERT</B>, or <B>UPDATE</B> statement and the specified table name did not exist.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The argument <I>szSqlStr</I> contained a <B>CREATE </B><B>TABLE</B> statement and a table specified in a constraint (referencing a table other than the one being created) did not exist.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>S0011
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E701"></A>
<P>Index already exists
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E701"></A>
<P>The argument <I>szSqlStr</I> contained a <B>CREATE </B><B>INDEX</B> statement and the specified index name already existed.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>S0012
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E702"></A>
<P>Index not found
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E702"></A>
<P>The argument <I>szSqlStr</I> contained a <B>DROP </B><B>INDEX</B> statement and the specified index name did not exist.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>S0021
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E703"></A>
<P>Column already exists
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E703"></A>
<P>The argument <I>szSqlStr</I> contained an <B>ALTER </B><B>TABLE</B> statement and the column specified in the <B>ADD</B> clause is not unique or identifies an existing column in the base table.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>S0022
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E704"></A>
<P>Column not found
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E704"></A>
<P>The argument <I>szSqlStr</I> contained a <B>CREATE </B><B>INDEX</B> statement and one or more of the column names specified in the column list did not exist.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top ><BR></TD>
<TD WIDTH=106 VALIGN=top ><BR></TD>
<TD WIDTH=260 VALIGN=top >
<BLOCKQUOTE>
<P>The argument <I>szSqlStr</I> contained a <B>GRANT</B> or <B>REVOKE</B> statement and a specified column name did not exist.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=86 VALIGN=top ><BR></TD>
<TD WIDTH=106 VALIGN=top ><BR></TD>
<TD WIDTH=260 VALIGN=top >
<BLOCKQUOTE>
<P>The argument <I>szSqlStr</I> contained a <B>SELECT</B>, <B>DELETE</B>, <B>INSERT</B>, or <B>UPDATE</B> statement and a specified column name did not exist.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The argument <I>szSqlStr</I> contained a <B>CREATE </B><B>TABLE</B> statement and a column specified in a constraint (referencing a table other than the one being created) did not exist.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>S1000
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E705"></A>
<P>General error
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E705"></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=106 VALIGN=top >
<A NAME="E7E706"></A>
<P>Memory allocation failure
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E706"></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>S1008
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E707"></A>
<P>Operation canceled
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E707"></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=86 VALIGN=top >
<BLOCKQUOTE>
<P>S1009
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E708"></A>
<P>Invalid argument value
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E708"></A>
<P>(DM) The argument <I>szSqlStr</I> was a null pointer.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>S1010
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E709"></A>
<P>Function sequence error
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E709"></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=86 VALIGN=top >
<BLOCKQUOTE>
<P>S1090
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E710"></A>
<P>Invalid string or buffer length
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E710"></A>
<P>(DM) The argument <I>cbSqlStr</I> was less than or equal to 0, but not equal to SQL_NTS.
<BLOCKQUOTE>
<P>A parameter value, set with <B>SQLBindParameter</B>, was a null pointer and the parameter length value was not 0, SQL_NULL_DATA, SQL_DATA_AT_EXEC, or less than or equal to SQL_LEN_DATA_AT_EXEC_OFFSET.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>A parameter value, set with <B>SQLBindParameter</B>, was not a null pointer and the parameter length value was less than 0, but was not SQL_NTS, SQL_NULL_DATA, SQL_DATA_AT_EXEC, or less than or equal to SQL_LEN_DATA_AT_EXEC_OFFSET.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>S1109
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E711"></A>
<P>Invalid cursor position
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E711"></A>
<P>The argument <I>szSqlStr</I> contained a positioned update or delete statement and the cursor was positioned (by <B>SQLSetPos</B> or <B>SQLExtendedFetch</B>) on a row for which the value in the <I>rgfRowStatus</I> array in <B>SQLExtendedFetch</B> was SQL_ROW_DELETED or SQL_ROW_ERROR.</TD>
</TR>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>S1C00
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E712"></A>
<P>Driver not capable
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E712"></A>
<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>
<TR>
<TD WIDTH=86 VALIGN=top >
<BLOCKQUOTE>
<P>S1T00
</BLOCKQUOTE></TD>
<TD WIDTH=106 VALIGN=top >
<A NAME="E7E713"></A>
<P>Timeout expired
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E713"></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="E11E152"></A>
<H3>
<FONT FACE="Arial">Comments<A NAME="I104"></A></FONT></H3>
<BLOCKQUOTE>
<P>The application calls <B>SQLExecDirect</B> to send an SQL statement to the data source. The driver modifies the statement to use the form of SQL used by the data source, then submits it to the data source. In particular, the driver modifies the escape clauses used to define ODBC-specific SQL. For a description of SQL statement grammar, see Appendix C, "SQL Grammar."<A NAME="I105"></A><A NAME="I106"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The application can include one or more parameter markers in the SQL statement. To include a parameter marker, the application embeds a question mark (?) into the SQL statement at the appropriate position.<A NAME="I107"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If the SQL statement is a <B>SELECT</B> statement, and if the application called <B>SQLSetCursorName</B> to associate a cursor with an <I>hstmt</I>, then the driver uses the specified cursor. Otherwise, the driver generates a cursor name.<A NAME="I108"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If the data source is in manual-commit mode (requiring explicit transaction initiation), and a transaction has not already been initiated, the driver initiates a transaction before it sends the SQL statement.<A NAME="I109"></A><A NAME="I110"></A><A NAME="I111"></A><A NAME="I112"></A><A NAME="I113"></A><A NAME="I114"></A><A NAME="I115"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If an application uses <B>SQLExecDirect</B> to submit a <B>COMMIT</B> or <B>ROLLBACK</B> statement, it will not be interoperable between DBMS products. To commit or roll back a transaction, call <B>SQLTransact</B>.<A NAME="I116"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If <B>SQLExecDirect</B> encounters a data-at-execution parameter, it returns SQL_NEED_DATA. The application sends the data using <B>SQLParamData</B> and <B>SQLPutData</B>. See <B>SQLBindParameter</B>, <B>SQLParamOptions</B>, <B>SQLParamData</B>, and <B>SQLPutData</B> for more information.
</BLOCKQUOTE>
<A NAME="E11E153"></A>
<H3>
<FONT FACE="Arial">Code Example<A NAME="I117"></A></FONT></H3>
<BLOCKQUOTE>
<P>See <B>SQLBindCol</B>, <B>SQLExtendedFetch</B>, <B>SQLGetData</B>,<B> </B>and <B>SQLProcedures</B>.
</BLOCKQUOTE>
<A NAME="E11E154"></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="E7E714"></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="E7E715"></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="E7E716"></A>
<P><B>SQLCancel</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Executing a prepared SQL statement
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E717"></A>
<P><B>SQLExecute</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="E7E718"></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="E7E719"></A>
<P><B>SQLFetch</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Returning a cursor name
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E720"></A>
<P><B>SQLGetCursorName</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Fetching part or all of a column of data
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E721"></A>
<P><B>SQLGetData</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Returning the next parameter to send data for
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E722"></A>
<P><B>SQLParamData</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Preparing a statement for execution
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E723"></A>
<P><B>SQLPrepare</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Sending parameter data at execution time
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E724"></A>
<P><B>SQLPutData</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Setting a cursor name
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E725"></A>
<P><B>SQLSetCursorName</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Setting a statement option
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E726"></A>
<P><B>SQLSetStmtOption</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Executing a commit or rollback operation
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E727"></A>
<P><B>SQLTransact</B></TD></TR></TABLE><P>
<A NAME="E7E728"></A>
<A NAME="E10E79"></A>
<H2>
<FONT FACE="Arial"><B>SQLExecute</B><B> (ODBC 1.0, Core)</B><A NAME="I118"></A></FONT></H2>
<BLOCKQUOTE>
<P><B>SQLExecute</B> executes a prepared statement, using the current values of the parameter marker variables if any parameter markers exist in the statement.
</BLOCKQUOTE>
<A NAME="E11E155"></A>
<H3>
<FONT FACE="Arial">Syntax</FONT></H3>
<BLOCKQUOTE>
<P>RETCODE <B>SQLExecute</B>(<I>hstmt</I>)<A NAME="I119"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The <B>SQLExecute</B> statement accepts the following argument.
</BLOCKQUOTE>
<TABLE WIDTH=800 >
<TR>
<TD WIDTH=73 VALIGN=top >
<BLOCKQUOTE>
<P><B>Type</B>
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E729"></A>
<P>Argument
</TD><TD WIDTH=120 VALIGN=top >
<A NAME="E7E729"></A>
<P>Use
</TD><TD WIDTH=166 VALIGN=top >
<A NAME="E7E729"></A>
<P>Description</TD>
</TR>
<TR>
<TD WIDTH=73 VALIGN=top >
<BLOCKQUOTE>
<P>HSTMT
</BLOCKQUOTE></TD>
<TD WIDTH=93 VALIGN=top >
<A NAME="E7E730"></A>
<P><I>hstmt</I>
</TD><TD WIDTH=120 VALIGN=top >
<A NAME="E7E730"></A>
<P>Input
</TD><TD WIDTH=166 VALIGN=top >
<A NAME="E7E730"></A>
<P>Statement handle.</TD></TR></TABLE>
<A NAME="E11E156"></A>
<H3>
<FONT FACE="Arial">Returns<A NAME="I120"></A></FONT></H3>
<BLOCKQUOTE>
<P>SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_NEED_DATA, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.
</BLOCKQUOTE>
<A NAME="E11E157"></A>
<H3>
<FONT FACE="Arial">Diagnostics<A NAME="I121"></A></FONT></H3>
<BLOCKQUOTE>
<P>When <B>SQLExecute</B> returns either 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>SQLExecute </B>and explains each one in the context of this function; the notation "(DM)" 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=80 VALIGN=top >
<BLOCKQUOTE>
<P><B>SQLSTATE</B>
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E731"></A>
<P>Error
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E731"></A>
<P>Description</TD>
</TR>
<TR>
<TD WIDTH=80 VALIGN=top >
<BLOCKQUOTE>
<P>01000
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E732"></A>
<P>General warning
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E732"></A>
<P>Driver-specific informational message. (Function returns SQL_SUCCESS_WITH_INFO.)</TD>
</TR>
<TR>
<TD WIDTH=80 VALIGN=top >
<BLOCKQUOTE>
<P>01004
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E733"></A>
<P>Data truncated
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E733"></A>
<P>The prepared statement associated with the <I>hstmt</I> contained a character or binary parameter or literal and the value exceeded the maximum length of the associated table column.
<BLOCKQUOTE>
<P>The prepared statement associated with the <I>hstmt</I> contained a numeric parameter or literal and the fractional part of the value was truncated.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The prepared statement associated with the <I>hstmt</I> contained a date or time parameter or literal and a timestamp value was truncated.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=80 VALIGN=top >
<BLOCKQUOTE>
<P>01006
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E734"></A>
<P>Privilege not revoked
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E734"></A>
<P>The prepared statement associated with the <I>hstmt</I> was <B>REVOKE</B> and the user did not have the specified privilege. (Function returns SQL_SUCCESS_WITH_INFO.)</TD>
</TR>
<TR>
<TD WIDTH=80 VALIGN=top >
<BLOCKQUOTE>
<P>01S03
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E735"></A>
<P>No rows updated or deleted
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E735"></A>
<P>The prepared statement associated with the <I>hstmt</I> was a positioned update or delete statement and no rows were updated or deleted. (Function returns SQL_SUCCESS_WITH_INFO.)</TD>
</TR>
<TR>
<TD WIDTH=80 VALIGN=top >
<BLOCKQUOTE>
<P>01S04
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E736"></A>
<P>More than one row updated or deleted
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E736"></A>
<P>The prepared statement associated with the <I>hstmt</I> was a positioned update or delete statement and more than one row was updated or deleted. (Function returns SQL_SUCCESS_WITH_INFO.)</TD>
</TR>
<TR>
<TD WIDTH=80 VALIGN=top >
<BLOCKQUOTE>
<P>07001
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E737"></A>
<P>Wrong number of parameters
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E737"></A>
<P>The number of parameters specified in <B>SQLBindParameter</B> was less than the number of parameters in the prepared statement associated with the <I>hstmt</I>.</TD>
</TR>
<TR>
<TD WIDTH=80 VALIGN=top >
<BLOCKQUOTE>
<P>08S01
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E738"></A>
<P>Communication link failure
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E738"></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=80 VALIGN=top >
<BLOCKQUOTE>
<P>22003
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E739"></A>
<P>Numeric value out of range
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E739"></A>
<P>The prepared statement associated with the <I>hstmt</I> contained a numeric parameter and the parameter value caused the whole (as opposed to fractional) part of the number to be truncated when assigned to the associated table column.</TD>
</TR>
<TR>
<TD WIDTH=80 VALIGN=top >
<BLOCKQUOTE>
<P>22005
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E740"></A>
<P>Error in assignment
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E740"></A>
<P>The prepared statement associated with the <I>hstmt</I> contained a parameter and the value was incompatible with the data type of the associated table column.</TD>
</TR>
<TR>
<TD WIDTH=80 VALIGN=top >
<BLOCKQUOTE>
<P>22008
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E741"></A>
<P>Datetime field overflow
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E741"></A>
<P>The prepared statement associated with the <I>hstmt</I> contained a date, time, or timestamp parameter or literal and the value was, respectively, an invalid date, time, or timestamp.</TD>
</TR>
<TR>
<TD WIDTH=80 VALIGN=top >
<BLOCKQUOTE>
<P>22012
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E742"></A>
<P>Division by zero
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E742"></A>
<P>The prepared statement associated with the <I>hstmt</I> contained an arithmetic expression which caused division by zero.</TD>
</TR>
<TR>
<TD WIDTH=80 VALIGN=top >
<BLOCKQUOTE>
<P>23000
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E743"></A>
<P>Integrity constraint violation
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E743"></A>
<P>The prepared statement associated with the <I>hstmt</I> contained a parameter. The parameter value was NULL for a column defined as NOT NULL in the associated table column, a duplicate value was supplied for a column constrained to contain only unique values, or some other integrity constraint was violated.</TD>
</TR>
<TR>
<TD WIDTH=80 VALIGN=top >
<BLOCKQUOTE>
<P>24000
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E744"></A>
<P>Invalid cursor state
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E744"></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.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The prepared statement associated with the <I>hstmt</I> contained a positioned update or delete statement and the cursor was positioned before the start of the result set or after the end of the result set.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=80 VALIGN=top >
<BLOCKQUOTE>
<P>40001
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E745"></A>
<P>Serialization failure
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E745"></A>
<P>The transaction to which the prepared statement associated with the <I>hstmt</I> belonged was terminated to prevent deadlock.</TD>
</TR>
<TR>
<TD WIDTH=80 VALIGN=top >
<BLOCKQUOTE>
<P>42000
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E746"></A>
<P>Syntax error or access violation
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E746"></A>
<P>The user did not have permission to execute the prepared statement associated with the <I>hstmt</I>.</TD>
</TR>
<TR>
<TD WIDTH=80 VALIGN=top >
<BLOCKQUOTE>
<P>IM001
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E747"></A>
<P>Driver does not support this function
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E747"></A>
<P>(DM) The driver associated with the <I>hstmt</I> does not support the function.</TD>
</TR>
<TR>
<TD WIDTH=80 VALIGN=top >
<BLOCKQUOTE>
<P>S1000
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E748"></A>
<P>General error
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E748"></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=80 VALIGN=top >
<BLOCKQUOTE>
<P>S1001
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E749"></A>
<P>Memory allocation failure
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E749"></A>
<P>The driver was unable to allocate memory required to support execution or completion of the function.</TD>
</TR>
<TR>
<TD WIDTH=80 VALIGN=top >
<BLOCKQUOTE>
<P>S1008
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E750"></A>
<P>Operation canceled
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E750"></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=80 VALIGN=top >
<BLOCKQUOTE>
<P>S1010
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E751"></A>
<P>Function sequence error
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E751"></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.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>(DM) The <I>hstmt</I> was not prepared. Either the <I>hstmt</I> was not in an executed state, or a cursor was open on the <I>hstmt</I> and <B>SQLFetch</B> or <B>SQLExtendedFetch</B> had been called.
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>The <I>hstmt</I> was not prepared. It was in an executed state and either no result set was associated with the <I>hstmt</I> or <B>SQLFetch</B> or <B>SQLExtendedFetch</B> had not been called.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=80 VALIGN=top >
<BLOCKQUOTE>
<P>S1090
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E752"></A>
<P>Invalid string or buffer length
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E752"></A>
<P>A parameter value, set with <B>SQLBindParameter</B>, was a null pointer and the parameter length value was not 0, SQL_NULL_DATA, SQL_DATA_AT_EXEC, or less than or equal to SQL_LEN_DATA_AT_EXEC_OFFSET.
<BLOCKQUOTE>
<P>A parameter value, set with <B>SQLBindParameter</B>, was not a null pointer and the parameter length value was less than 0, but was not SQL_NTS, SQL_NULL_DATA, or SQL_DATA_AT_EXEC, or less than or equal to SQL_LEN_DATA_AT_EXEC_OFFSET.</TD>
</TR>
</BLOCKQUOTE>
<TR>
<TD WIDTH=80 VALIGN=top >
<BLOCKQUOTE>
<P>S1109
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E753"></A>
<P>Invalid cursor position
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E753"></A>
<P>The prepared statement was a positioned update or delete statement and the cursor was positioned (by <B>SQLSetPos</B> or <B>SQLExtendedFetch</B>) on a row for which the value in the <I>rgfRowStatus</I> array in <B>SQLExtendedFetch</B> was SQL_ROW_DELETED or SQL_ROW_ERROR.</TD>
</TR>
<TR>
<TD WIDTH=80 VALIGN=top >
<BLOCKQUOTE>
<P>S1C00
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E754"></A>
<P>Driver not capable
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E754"></A>
<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>
<TR>
<TD WIDTH=80 VALIGN=top >
<BLOCKQUOTE>
<P>S1T00
</BLOCKQUOTE></TD>
<TD WIDTH=113 VALIGN=top >
<A NAME="E7E755"></A>
<P>Timeout expired
</TD><TD WIDTH=260 VALIGN=top >
<A NAME="E7E755"></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="I122"></A>
<BLOCKQUOTE>
<P><B>SQLExecute</B> can return any SQLSTATE that can be returned by <B>SQLPrepare</B> based on when the data source evaluates the SQL statement associated with the <I>hstmt</I>.
</BLOCKQUOTE>
<A NAME="E11E158"></A>
<H3>
<FONT FACE="Arial">Comments<A NAME="I123"></A><A NAME="I124"></A><A NAME="I125"></A></FONT></H3>
<BLOCKQUOTE>
<P><B>SQLExecute</B> executes a statement prepared by <B>SQLPrepare</B>. Once the application processes or discards the results from a call to <B>SQLExecute</B>, the application can call <B>SQLExecute</B> again with new parameter values.<A NAME="I126"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>To execute a <B>SELECT</B> statement more than once, the application must call <B>SQLFreeStmt</B> with the SQL_CLOSE parameter before reissuing the <B>SELECT</B> statement.<A NAME="I127"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If the data source is in manual-commit mode (requiring explicit transaction initiation), and a transaction has not already been initiated, the driver initiates a transaction before it sends the SQL statement.<A NAME="I128"></A><A NAME="I129"></A><A NAME="I130"></A><A NAME="I131"></A><A NAME="I132"></A><A NAME="I133"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If an application uses <B>SQLPrepare</B> to prepare and <B>SQLExecute</B> to submit a <B>COMMIT</B> or <B>ROLLBACK</B> statement, it will not be interoperable between DBMS products. To commit or roll back a transaction, call <B>SQLTransact</B>.<A NAME="I134"></A>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>If <B>SQLExecute</B> encounters a data-at-execution parameter, it returns SQL_NEED_DATA. The application sends the data using <B>SQLParamData</B> and <B>SQLPutData</B>. See <B>SQLBindParameter</B>, <B>SQLParamOptions</B>, <B>SQLParamData</B>, and <B>SQLPutData</B> for more information.
</BLOCKQUOTE>
<A NAME="E11E159"></A>
<H3>
<FONT FACE="Arial">Code Example<A NAME="I135"></A></FONT></H3>
<BLOCKQUOTE>
<P>See <B>SQLBindParameter</B>,<B> SQLParamOptions</B>, <B>SQLPutData</B>,<B> </B>and <B>SQLSetPos</B>.
</BLOCKQUOTE>
<A NAME="E11E160"></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="E7E756"></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="E7E757"></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="E7E758"></A>
<P><B>SQLCancel</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Executing an SQL statement
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E759"></A>
<P><B>SQLExecDirect</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="E7E760"></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="E7E761"></A>
<P><B>SQLFetch</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Freeing a statement handle
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E762"></A>
<P><B>SQLFreeStmt</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Returning a cursor name
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E763"></A>
<P><B>SQLGetCursorName</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Fetching part or all of a column of data
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E764"></A>
<P><B>SQLGetData</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Returning the next parameter to send data for
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E765"></A>
<P><B>SQLParamData</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Preparing a statement for execution
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E766"></A>
<P><B>SQLPrepare</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Sending parameter data at execution time
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E767"></A>
<P><B>SQLPutData</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Setting a cursor name
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E768"></A>
<P><B>SQLSetCursorName</B></TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Setting a statement option
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E769"></A>
<P><B>SQLSetStmtOption</B> (extension)</TD>
</TR>
<TR>
<TD WIDTH=250 VALIGN=top >
<BLOCKQUOTE>
<P>Executing a commit or rollback operation
</BLOCKQUOTE></TD>
<TD WIDTH=202 VALIGN=top >
<A NAME="E7E770"></A>
<P><B>SQLTransact</B></TD></TR></TABLE><P>
<A NAME="E7E771"></A>
<P ALIGN=CENTER>
<A HREF="prguid16.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="prguid18.htm" TARGET="_self"><IMG SRC="granext.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Next Page"></A>
<center><p><font SIZE=-2>Copyright © 1992-1997 Solid Information Technology Ltd All rights reserved.</font></p></center>
</BODY></HTML>
|