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
|
<?xml version="1.0" encoding="utf-8"?>
<Type Name="DbDataAdapter" FullName="System.Data.Common.DbDataAdapter">
<TypeSignature Language="C#" Maintainer="auto" Value="public abstract class DbDataAdapter : System.Data.Common.DataAdapter, ICloneable, System.Data.IDbDataAdapter" />
<AssemblyInfo>
<AssemblyName>System.Data</AssemblyName>
<AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00]</AssemblyPublicKey>
<AssemblyVersion>1.0.3300.0</AssemblyVersion>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
<Base>
<BaseTypeName>System.Data.Common.DataAdapter</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Data.IDbDataAdapter</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.ICloneable</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="T:System.Data.Common.DbDataAdapter" /> class inherits from the <see cref="T:System.Data.Common.DataAdapter" /> class and helps a class implement a DataAdapter designed for use with a relational database.</para>
<para>An application does not create an instance of the <see cref="T:System.Data.Common.DbDataAdapter" /> interface directly, but creates an instance of a class that inherits <see cref="T:System.Data.IDbDataAdapter" /> and <see cref="T:System.Data.Common.DbDataAdapter" />.</para>
<para>Classes that inherit <see cref="T:System.Data.Common.DbDataAdapter" /> must implement the inherited members, and typically define additional members to add provider-specific functionality. For example, the <see cref="T:System.Data.Common.DbDataAdapter" /> class defines the <see cref="P:System.Data.IDbDataAdapter.SelectCommand" /> property, and the <see cref="T:System.Data.Common.DbDataAdapter" /> interface defines eight overloads of the <see cref="M:System.Data.IDataAdapter.Fill(System.Data.DataSet)" /> method. In turn, the <see cref="T:System.Data.OleDb.OleDbDataAdapter" /> class inherits the <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> method, and also defines two additional overloads of <see cref="M:System.Data.OleDb.OleDbDataAdapter.Fill(System.Data.DataTable,System.Object)" /> that take an ADO Recordset object as a parameter.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Aids implementation of the <see cref="T:System.Data.IDbDataAdapter" /> interface. Inheritors of <see cref="T:System.Data.Common.DbDataAdapter" /> implement a set of functions to provide strong typing, but inherit most of the functionality needed to fully implement a DataAdapter. </para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected DbDataAdapter ();" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>When you create an instance of <see cref="T:System.Data.Common.DbDataAdapter" />, the following read/write properties are set to the following initial values.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Properties </para>
</term>
<description>
<para>Initial value </para>
</description>
</item>
</listheader>
<item>
<term>
<para>
<see cref="P:System.Data.IDbDataAdapter.SelectCommand" /> </para>
</term>
<description>
<para>A new <see cref="T:System.Data.IDbCommand" />. </para>
</description>
</item>
<item>
<term>
<para>
<see cref="P:System.Data.IDbDataAdapter.InsertCommand" /> </para>
</term>
<description>
<para>A new <see cref="T:System.Data.IDbCommand" />. </para>
</description>
</item>
<item>
<term>
<para>
<see cref="P:System.Data.IDbDataAdapter.DeleteCommand" /> </para>
</term>
<description>
<para>A new <see cref="T:System.Data.IDbCommand" />. </para>
</description>
</item>
<item>
<term>
<para>
<see cref="P:System.Data.IDbDataAdapter.UpdateCommand" /> </para>
</term>
<description>
<para>A new <see cref="T:System.Data.IDbCommand" />. </para>
</description>
</item>
<item>
<term>
<para>
<see cref="P:System.Data.Common.DataAdapter.MissingMappingAction" /> </para>
</term>
<description>
<para>MissingMappingAction.Passthrough </para>
</description>
</item>
<item>
<term>
<para>
<see cref="P:System.Data.Common.DataAdapter.MissingSchemaAction" /> </para>
</term>
<description>
<para>MissingSchemaAction.Add </para>
</description>
</item>
</list>
<para>You can change the value of any of these properties through a separate call to the property.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of a DataAdapter class.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected DbDataAdapter (System.Data.Common.DbDataAdapter adapter);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="adapter" Type="System.Data.Common.DbDataAdapter" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This overload of the <see cref="T:System.Data.Common.DbDataAdapter" /> constructor is designed for use by a .NET Framework data provider when implementing a similar constructor for use in a clone implementation.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of a DataAdapter class from an existing object of the same type.</para>
</summary>
<param name="adapter">
<attribution license="cc4" from="Microsoft" modified="false" />A DataAdapter object used to create the new DataAdapter. </param>
</Docs>
</Member>
<Member MemberName="AddToBatch">
<MemberSignature Language="C#" Value="protected virtual int AddToBatch (System.Data.IDbCommand command);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="command" Type="System.Data.IDbCommand" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>In <see cref="T:System.Data.Common.DbDataAdapter" />, this method throws <see cref="T:System.NotSupportedException" />. Classes that inherit from <see cref="T:System.Data.Common.DbDataAdapter" /> override this method to provide support for batches.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Adds a <see cref="T:System.Data.IDbCommand" /> to the current batch.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The number of commands in the batch before adding the <see cref="T:System.Data.IDbCommand" />.</para>
</returns>
<param name="command">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Data.IDbCommand" /> to add to the batch.</param>
</Docs>
</Member>
<Member MemberName="ClearBatch">
<MemberSignature Language="C#" Value="protected virtual void ClearBatch ();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>In <see cref="T:System.Data.Common.DbDataAdapter" />, this method throws <see cref="T:System.NotSupportedException" />. Classes that inherit from <see cref="T:System.Data.Common.DbDataAdapter" /> override this method to provide support for batches.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Removes all <see cref="T:System.Data.IDbCommand" /> objects from the batch.</para>
</summary>
</Docs>
</Member>
<Member MemberName="CreateRowUpdatedEvent">
<MemberSignature Language="C#" Value="protected virtual System.Data.Common.RowUpdatedEventArgs CreateRowUpdatedEvent (System.Data.DataRow dataRow, System.Data.IDbCommand command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Data.Common.RowUpdatedEventArgs</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataRow" Type="System.Data.DataRow" />
<Parameter Name="command" Type="System.Data.IDbCommand" />
<Parameter Name="statementType" Type="System.Data.StatementType" />
<Parameter Name="tableMapping" Type="System.Data.Common.DataTableMapping" />
</Parameters>
<Docs>
<remarks>To be added</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Data.Common.RowUpdatedEventArgs" /> class.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A new instance of the <see cref="T:System.Data.Common.RowUpdatedEventArgs" /> class.</para>
</returns>
<param name="dataRow">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Data.DataRow" /> used to update the data source. </param>
<param name="command">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Data.IDbCommand" /> executed during the <see cref="M:System.Data.IDataAdapter.Update(System.Data.DataSet)" />. </param>
<param name="statementType">
<attribution license="cc4" from="Microsoft" modified="false" />Whether the command is an UPDATE, INSERT, DELETE, or SELECT statement. </param>
<param name="tableMapping">
<attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Data.Common.DataTableMapping" /> object. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="CreateRowUpdatingEvent">
<MemberSignature Language="C#" Value="protected virtual System.Data.Common.RowUpdatingEventArgs CreateRowUpdatingEvent (System.Data.DataRow dataRow, System.Data.IDbCommand command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Data.Common.RowUpdatingEventArgs</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataRow" Type="System.Data.DataRow" />
<Parameter Name="command" Type="System.Data.IDbCommand" />
<Parameter Name="statementType" Type="System.Data.StatementType" />
<Parameter Name="tableMapping" Type="System.Data.Common.DataTableMapping" />
</Parameters>
<Docs>
<remarks>To be added</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Data.Common.RowUpdatingEventArgs" /> class.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A new instance of the <see cref="T:System.Data.Common.RowUpdatingEventArgs" /> class.</para>
</returns>
<param name="dataRow">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Data.DataRow" /> that updates the data source. </param>
<param name="command">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Data.IDbCommand" /> to execute during the <see cref="M:System.Data.IDataAdapter.Update(System.Data.DataSet)" />. </param>
<param name="statementType">
<attribution license="cc4" from="Microsoft" modified="false" />Whether the command is an UPDATE, INSERT, DELETE, or SELECT statement. </param>
<param name="tableMapping">
<attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Data.Common.DataTableMapping" /> object. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="DefaultSourceTableName">
<MemberSignature Language="C#" Value="public const string DefaultSourceTableName;" />
<MemberType>Field</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>"Table" is the default name used by the <see cref="T:System.Data.Common.DataAdapter" /> object for table mappings.</para>
<para>
<see cref="F:System.Data.Common.DbDataAdapter.DefaultSourceTableName" /> is when an application adds a table mapping to be used with <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" />, but does not specify a <see cref="T:System.Data.DataTable" /> name.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The default name used by the <see cref="T:System.Data.Common.DataAdapter" /> object for table mappings.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="DeleteCommand">
<MemberSignature Language="C#" Value="public System.Data.Common.DbCommand DeleteCommand { set; get; }" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Data.Common.DbCommand</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>During <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" />, if this property is not set and primary key information is present in the <see cref="T:System.Data.DataSet" />, the <see cref="P:System.Data.IDbDataAdapter.DeleteCommand" /> is automatically generated.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets or sets a command for deleting records from the data set.</para>
</summary>
</Docs>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="protected override void Dispose (bool disposing);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="disposing" Type="System.Boolean" />
</Parameters>
<Docs>
<remarks>To be added</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Releases the unmanaged resources used by the <see cref="T:System.Data.Common.DbDataAdapter" /> and optionally releases the managed resources.</para>
</summary>
<param name="disposing">
<attribution license="cc4" from="Microsoft" modified="false" />true to release both managed and unmanaged resources; false to release only unmanaged resources. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="ExecuteBatch">
<MemberSignature Language="C#" Value="protected virtual int ExecuteBatch ();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>In <see cref="T:System.Data.Common.DbDataAdapter" />, this method throws <see cref="T:System.NotSupportedException" />. Classes that inherit from <see cref="T:System.Data.Common.DbDataAdapter" /> override this method to provide support for batches.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Executes the current batch.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The return value from the last command in the batch.</para>
</returns>
</Docs>
</Member>
<Member MemberName="Fill">
<MemberSignature Language="C#" Value="public override int Fill (System.Data.DataSet dataSet);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataSet" Type="System.Data.DataSet" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> method retrieves the data from the data source using a SELECT statement. The <see cref="T:System.Data.IDbConnection" /> object associated with the select command must be valid, but it does not need to be open. If the <see cref="T:System.Data.IDbConnection" /> is closed before <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> is called, it is opened to retrieve data and then closed. If the connection is open before <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> is called, it remains open.</para>
<para>If an error or an exception is encountered while populating the data tables, rows added prior to the occurrence of the error remain in the data tables. The remainder of the operation is aborted.</para>
<para>If a command does not return any rows, no tables are added to the <see cref="T:System.Data.DataSet" />, and no exception is raised.</para>
<para>If the <see cref="T:System.Data.Common.DbDataAdapter" /> object encounters duplicate columns while populating a <see cref="T:System.Data.DataTable" />, it generates names for the subsequent columns using the pattern "columnname1", "columnname2", "columnname3", and so on. If the incoming data contains unnamed columns, they are placed in the <see cref="T:System.Data.DataSet" /> according to the pattern "Column1", "Column2", and so on.</para>
<para>When the query specified returns multiple results, the result set for each row returning query is placed in a separate table. Additional result sets are named by appending integral values to the specified table name (for example, "Table", "Table1", "Table2", and so on). Because no table is created for a query that does not return rows, if you process an insert query followed by a select query, the table created for the select query is named "Table" because it is the first table created. Applications using column and table names should ensure that conflicts with these naming patterns does not occur.</para>
<para>When the SELECT statement used to populate the <see cref="T:System.Data.DataSet" /> returns multiple results, such as batch SQL statements, if one of the results contains an error, all subsequent results are skipped and are not added to the <see cref="T:System.Data.DataSet" />.</para>
<para>When using subsequent <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> calls to refresh the contents of the <see cref="T:System.Data.DataSet" />, two conditions must be met: </para>
<list type="ordered">
<item>
<para>The SQL statement should match the one initially used to populate the <see cref="T:System.Data.DataSet" />.</para>
</item>
<item>
<para>The Key column information must be present.</para>
</item>
</list>
<para>If primary key information is present, any duplicate rows are reconciled and only appear once in the <see cref="T:System.Data.DataTable" /> that corresponds to the <see cref="T:System.Data.DataSet" />. Primary key information may be set either through <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" />, by specifying the <see cref="P:System.Data.DataTable.PrimaryKey" /> property of the <see cref="T:System.Data.DataTable" />, or by setting the <see cref="P:System.Data.Common.DataAdapter.MissingSchemaAction" /> property to AddWithKey.</para>
<para>If the SelectCommand returns the results of an OUTER JOIN, the DataAdapter does not set a <see cref="P:System.Data.DataTable.PrimaryKey" /> value for the resulting <see cref="T:System.Data.DataTable" />. You must explicitly define the primary key to ensure that duplicate rows are resolved correctly. For more information, see <format type="text/html"><a href="2ea85959-e763-4669-8bd9-46a9dab894bd">Defining a Primary Key for a Table</a></format>.</para>
<block subset="none" type="note">
<para>When handling batch SQL statements that return multiple results, the implementation of <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> for the .NET Framework Data Provider for OLE DB retrieves schema information for only the first result. To retrieve schema information for multiple results, use <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> with the <see cref="T:System.Data.MissingSchemaAction" /> set to AddWithKey.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Adds or refreshes rows in the <see cref="T:System.Data.DataSet" />.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The number of rows successfully added to or refreshed in the <see cref="T:System.Data.DataSet" />. This does not include rows affected by statements that do not return rows.</para>
</returns>
<param name="dataSet">
<attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Data.DataSet" /> to fill with records and, if necessary, schema. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Fill">
<MemberSignature Language="C#" Value="public int Fill (System.Data.DataTable dataTable);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataTable" Type="System.Data.DataTable" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> method retrieves rows from the data source using the SELECT statement specified by an associated <see cref="P:System.Data.IDbDataAdapter.SelectCommand" /> property. The connection object associated with the SELECT statement must be valid, but it does not need to be open. If the connection is closed before <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> is called, it is opened to retrieve data, then closed. If the connection is open before <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> is called, it remains open.</para>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> operation then adds the rows to destination <see cref="T:System.Data.DataTable" /> objects in the <see cref="T:System.Data.DataSet" />, creating the <see cref="T:System.Data.DataTable" /> objects if they do not already exist. When creating <see cref="T:System.Data.DataTable" /> objects, the <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> operation normally creates only column name metadata. However, if the <see cref="P:System.Data.IDataAdapter.MissingSchemaAction" /> property is set to AddWithKey, appropriate primary keys and constraints are also created.</para>
<para>If the <see cref="T:System.Data.Common.DbDataAdapter" /> encounters duplicate columns while populating a <see cref="T:System.Data.DataTable" />, it generates names for the subsequent columns, using the pattern "columnname1", "columnname2", "columnname3", and so on. If the incoming data contains unnamed columns, they are placed in the <see cref="T:System.Data.DataSet" /> according to the pattern "Column1", "Column2", and so on. When multiple result sets are added to the <see cref="T:System.Data.DataSet" /> each result set is placed in a separate table.</para>
<para>The overload of <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> that takes <paramref name="DataTable" /> as a parameter only obtains the first result. Use an overload of <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> that takes <paramref name="DataSet" /> as a parameter to obtain multiple results.</para>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> method supports scenarios where the <see cref="T:System.Data.DataSet" /> contains multiple <see cref="T:System.Data.DataTable" /> objects whose names differ only by case. In such situations, <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> performs a case-sensitive comparison to find the corresponding table, and creates a new table if no exact match exists. The following C# code illustrates this behavior.</para>
<code>DataSet dataset = new DataSet();
dataset.Tables.Add("aaa");
dataset.Tables.Add("AAA");
adapter.Fill(dataset, "aaa"); // Fills "aaa", which already exists in the DataSet.
adapter.Fill(dataset, "Aaa"); // Adds a new table called "Aaa".</code>
<para>If <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> is called and the <see cref="T:System.Data.DataSet" /> contains only one <see cref="T:System.Data.DataTable" /> whose name differs only by case, that <see cref="T:System.Data.DataTable" /> is updated. In this scenario, the comparison is case insensitive. The following C# code illustrates this behavior.</para>
<code>DataSet dataset = new DataSet();
dataset.Tables.Add("aaa");
adapter.Fill(dataset, "AAA"); // Fills table "aaa" because only one similarly named table is in the DataSet.</code>
<para>You can use the <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> method multiple times on the same <see cref="T:System.Data.DataTable" />. If a primary key exists, incoming rows are merged with matching rows that already exist. If no primary key exists, incoming rows are appended to the <see cref="T:System.Data.DataTable" />.</para>
<para>If the SelectCommand returns the results of an OUTER JOIN, the DataAdapter does not set a <see cref="P:System.Data.DataTable.PrimaryKey" /> value for the resulting <see cref="T:System.Data.DataTable" />. You must explicitly define the primary key to ensure that duplicate rows are resolved correctly. For more information, see <format type="text/html"><a href="2ea85959-e763-4669-8bd9-46a9dab894bd">Defining a Primary Key for a Table</a></format>.</para>
<block subset="none" type="note">
<para>When handling batch SQL statements that return multiple results, the implementation of <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> and <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> for a .NET Framework data provider retrieves schema information for only the first result.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Adds or refreshes rows in a specified range in the <see cref="T:System.Data.DataSet" /> to match those in the data source using the <see cref="T:System.Data.DataTable" /> name.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The number of rows successfully added to or refreshed in the <see cref="T:System.Data.DataSet" />. This does not include rows affected by statements that do not return rows.</para>
</returns>
<param name="dataTable">
<attribution license="cc4" from="Microsoft" modified="false" />The name of the <see cref="T:System.Data.DataTable" /> to use for table mapping. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Fill">
<MemberSignature Language="C#" Value="public int Fill (System.Data.DataSet dataSet, string srcTable);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataSet" Type="System.Data.DataSet" />
<Parameter Name="srcTable" Type="System.String" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> method retrieves the data from the data source using a SELECT statement. The <see cref="T:System.Data.IDbConnection" /> object associated with the select command must be valid, but it does not need to be open. If the <see cref="T:System.Data.IDbConnection" /> is closed before <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> is called, it is opened to retrieve data, then closed. If the connection is open before <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> is called, it remains open.</para>
<para>If a command does not return any rows, no tables are added to the <see cref="T:System.Data.DataSet" />, and no exception is raised.</para>
<para>If the <see cref="T:System.Data.Common.DbDataAdapter" /> object encounters duplicate columns while populating a <see cref="T:System.Data.DataTable" />, it will generate names for the subsequent columns, using the pattern "columnname1", "columnname2", "columnname3", and so on. If the incoming data contains unnamed columns, they are placed in the <see cref="T:System.Data.DataSet" /> according to the pattern "Column1", "Column2", and so on.</para>
<para>When the query specified returns multiple results, each result set is placed in a separate table. Additional result sets are named by appending integral values to the specified table name (for example, "Table", "Table1", "Table2", and so on). Since no table is created for a query that does not return rows, if you were to process an insert query followed by a select query, the table created for the select query would be named "Table", because it is the first table created. Applications using column and table names should ensure that conflicts with these naming patterns does not occur.</para>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> method supports scenarios where the <see cref="T:System.Data.DataSet" /> contains multiple <see cref="T:System.Data.DataTable" /> objects whose names differ only by case. In such situations, <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> performs a case-sensitive comparison to find the corresponding table, and creates a new table if no exact match exists. The following C# code illustrates this behavior.</para>
<code> DataSet dataset = new DataSet();
dataset.Tables.Add("aaa");
dataset.Tables.Add("AAA");
adapter.Fill(dataset, "aaa"); // Fills "aaa", which already exists in the DataSet.
adapter.Fill(dataset, "Aaa"); // Adds a new table called "Aaa".</code>
<para>If <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> is called and the <see cref="T:System.Data.DataSet" /> contains only one <see cref="T:System.Data.DataTable" /> whose name differs only by case, that <see cref="T:System.Data.DataTable" /> is updated. In this scenario, the comparison is case insensitive. The following C# code illustrates this behavior.</para>
<code> DataSet dataset = new DataSet();
dataset.Tables.Add("aaa");
adapter.Fill(dataset, "AAA"); // Fills table "aaa" because only one similarly named table is in the DataSet.</code>
<para>If an error or an exception is encountered while populating the data tables, rows added prior to the occurrence of the error remain in the data tables. The remainder of the operation is aborted.</para>
<para>When the SELECT statement used to populate the <see cref="T:System.Data.DataSet" /> returns multiple results, such as a batch SQL statement, be aware of the following: </para>
<list type="bullet">
<item>
<para>If one of the results contains an error, all subsequent results are skipped and not added to the <see cref="T:System.Data.DataSet" />.</para>
</item>
</list>
<para>When using subsequent <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> calls to refresh the contents of the <see cref="T:System.Data.DataSet" />, two conditions must be met: </para>
<list type="ordered">
<item>
<para>The SQL statement should match the one initially used to populate the <see cref="T:System.Data.DataSet" />.</para>
</item>
<item>
<para>The Key column information must be present. If primary key information is present, any duplicate rows are reconciled and only appear once in the <see cref="T:System.Data.DataTable" /> that corresponds to the <see cref="T:System.Data.DataSet" />. Primary key information may be set either through <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" />, by specifying the <see cref="P:System.Data.DataTable.PrimaryKey" /> property of the <see cref="T:System.Data.DataTable" />, or by setting the <see cref="P:System.Data.Common.DataAdapter.MissingSchemaAction" /> property to AddWithKey.</para>
</item>
</list>
<para>If the SelectCommand returns the results of an OUTER JOIN, the DataAdapter does not set a <see cref="P:System.Data.DataTable.PrimaryKey" /> value for the resulting <see cref="T:System.Data.DataTable" />. You must explicitly define the primary key to ensure that duplicate rows are resolved correctly. For more information, see<format type="text/html"><a href="2ea85959-e763-4669-8bd9-46a9dab894bd"> Defining a Primary Key for a Table</a></format>.</para>
<block subset="none" type="note">
<para>When handling batch SQL statements that return multiple results, the implementation of <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> for the .NET Framework Data Provider for OLE DB retrieves schema information for only the first result. To retrieve schema information for multiple results, use <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> with the <see cref="T:System.Data.MissingSchemaAction" /> set to AddWithKey.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Adds or refreshes rows in the <see cref="T:System.Data.DataSet" /> to match those in the data source using the <see cref="T:System.Data.DataSet" /> and <see cref="T:System.Data.DataTable" /> names.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The number of rows successfully added to or refreshed in the <see cref="T:System.Data.DataSet" />. This does not include rows affected by statements that do not return rows.</para>
</returns>
<param name="dataSet">
<attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Data.DataSet" /> to fill with records and, if necessary, schema. </param>
<param name="srcTable">
<attribution license="cc4" from="Microsoft" modified="false" />The name of the source table to use for table mapping. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Fill">
<MemberSignature Language="C#" Value="protected virtual int Fill (System.Data.DataTable dataTable, System.Data.IDataReader dataReader);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataTable" Type="System.Data.DataTable" />
<Parameter Name="dataReader" Type="System.Data.IDataReader" />
</Parameters>
<Docs>
<param name="dataTable">To be added.</param>
<param name="dataReader">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Fill">
<MemberSignature Language="C#" Value="protected virtual int Fill (System.Data.DataTable dataTable, System.Data.IDbCommand command, System.Data.CommandBehavior behavior);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataTable" Type="System.Data.DataTable" />
<Parameter Name="command" Type="System.Data.IDbCommand" />
<Parameter Name="behavior" Type="System.Data.CommandBehavior" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> method retrieves rows from the data source using the SELECT statement specified by an associated <see cref="P:System.Data.IDbDataAdapter.SelectCommand" /> property. The connection object associated with the SELECT statement must be valid, but it does not need to be open. If the connection is closed before <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> is called, it is opened to retrieve data and then closed. If the connection is open before <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> is called, it remains open.</para>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> operation then adds the rows to the specified destination <see cref="T:System.Data.DataTable" /> object in the <see cref="T:System.Data.DataSet" />, creating the <see cref="T:System.Data.DataTable" /> object if it does not already exist. When creating a <see cref="T:System.Data.DataTable" /> object, the <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> operation normally creates only column name metadata. However, if the <see cref="P:System.Data.IDataAdapter.MissingSchemaAction" /> property is set to AddWithKey, appropriate primary keys and constraints are also created.</para>
<para>If the <see cref="T:System.Data.Common.DbDataAdapter" /> object encounters duplicate columns while populating a <see cref="T:System.Data.DataTable" />, it will generate names for the subsequent columns, using the pattern "columnname1", "columnname2", "columnname3", and so on. If the incoming data contains unnamed columns, they are placed in the <see cref="T:System.Data.DataSet" /> according to the pattern "Column1", "Column2", and so on.</para>
<para>The overload of <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> that takes <paramref name="DataTable" /> as a parameter only obtains the first result. Use an overload of <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> that takes <paramref name="DataSet" /> as a parameter to obtain multiple results.</para>
<para>You can use the <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> method multiple times on the same <see cref="T:System.Data.DataTable" />. If a primary key exists, incoming rows are merged with matching rows that already exist. If no primary key exists, incoming rows are appended to the <see cref="T:System.Data.DataTable" />.</para>
<para>If the SelectCommand returns the results of an OUTER JOIN, the DataAdapter does not set a <see cref="P:System.Data.DataTable.PrimaryKey" /> value for the resulting <see cref="T:System.Data.DataTable" />. You must explicitly define the primary key to ensure that duplicate rows are resolved correctly. For more information, see <format type="text/html"><a href="2ea85959-e763-4669-8bd9-46a9dab894bd">Defining a Primary Key for a Table</a></format>.</para>
<block subset="none" type="note">
<para>When handling batch SQL statements that return multiple results, the implementation of <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> for the .NET Framework Data Provider for OLE DB retrieves schema information for only the first result. To retrieve schema information for multiple results, use <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> with the <see cref="T:System.Data.MissingSchemaAction" /> set to AddWithKey.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Adds or refreshes rows in a <see cref="T:System.Data.DataTable" /> to match those in the data source using the specified <see cref="T:System.Data.DataTable" />, <see cref="T:System.Data.IDbCommand" /> and <see cref="T:System.Data.CommandBehavior" />.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The number of rows successfully added to or refreshed in the <see cref="T:System.Data.DataTable" />. This does not include rows affected by statements that do not return rows.</para>
</returns>
<param name="dataTable">
<attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Data.DataTable" /> to fill with records and, if necessary, schema. </param>
<param name="command">
<attribution license="cc4" from="Microsoft" modified="false" />The SQL SELECT statement used to retrieve rows from the data source. </param>
<param name="behavior">
<attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Data.CommandBehavior" /> values.</param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Fill">
<MemberSignature Language="C#" Value="public int Fill (int startRecord, int maxRecords, System.Data.DataTable[] dataTables);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="startRecord" Type="System.Int32" />
<Parameter Name="maxRecords" Type="System.Int32" />
<Parameter Name="dataTables" Type="System.Data.DataTable[]">
<Attributes>
<Attribute>
<AttributeName>System.ParamArray</AttributeName>
</Attribute>
</Attributes>
</Parameter>
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Data.Common.DataAdapter.Fill(System.Data.DataSet)" /> method retrieves rows from the data source using the SELECT statement specified by an associated <see cref="P:System.Data.IDbDataAdapter.SelectCommand" /> property. The connection object associated with the SELECT statement must be valid, but it does not need to be open. If the connection is closed before <see cref="M:System.Data.Common.DataAdapter.Fill(System.Data.DataSet)" /> is called, it is opened to retrieve data, and then it is closed. If the connection is open before <see cref="M:System.Data.Common.DataAdapter.Fill(System.Data.DataSet)" /> is called, it remains open.</para>
<para>The <see cref="M:System.Data.Common.DataAdapter.Fill(System.Data.DataSet)" /> operation then adds the rows to destination <see cref="T:System.Data.DataTable" /> objects in the <see cref="T:System.Data.DataSet" />, creating the <see cref="T:System.Data.DataTable" /> objects if they do not already exist. When creating <see cref="T:System.Data.DataTable" /> objects, the <see cref="M:System.Data.Common.DataAdapter.Fill(System.Data.DataSet)" /> operation normally creates only column name metadata. However, if the <see cref="P:System.Data.IDataAdapter.MissingSchemaAction" /> property is set to AddWithKey, appropriate primary keys and constraints are also created.</para>
<para>If the SelectCommand returns the results of an OUTER JOIN, the DataAdapter does not set a <see cref="P:System.Data.DataTable.PrimaryKey" /> value for the resulting <see cref="T:System.Data.DataTable" />. You must explicitly define the primary key to ensure that duplicate rows are resolved correctly. For more information, see <format type="text/html"><a href="2EA85959-E763-4669-8BD9-46A9DAB894BD">Defining a Primary Key for a Table</a></format>.</para>
<para>If the data adapter encounters duplicate columns while populating a <see cref="T:System.Data.DataTable" />, it generates names for the subsequent columns, using the pattern "columnname1", "columnname2", "columnname3", and so on. If the incoming data contains unnamed columns, they are placed in the <see cref="T:System.Data.DataSet" /> according to the pattern "Column1", "Column2", and so on. When multiple result sets are added to the <see cref="T:System.Data.DataSet" />, each result set is placed in a separate table. Additional result sets are named by appending integral values to the specified table name (for example, "Table", "Table1", "Table2", and so on). Applications using column and table names should ensure that conflicts with these naming patterns does not occur.</para>
<para>When the SELECT statement used to populate the <see cref="T:System.Data.DataSet" /> returns multiple results, such as a batch SQL statements, if one of the results contains an error, all subsequent results are skipped and not added to the <see cref="T:System.Data.DataSet" />.</para>
<para>You can use the <see cref="M:System.Data.Common.DataAdapter.Fill(System.Data.DataSet)" /> method multiple times on the same <see cref="T:System.Data.DataTable" />. If a primary key exists, incoming rows are merged with matching rows that already exist. If no primary key exists, incoming rows are appended to the <see cref="T:System.Data.DataTable" />.</para>
<block subset="none" type="note">
<para>When handling batch SQL statements that return multiple results, the implementation of <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> for the .NET Framework Data Provider for OLE DB retrieves schema information for only the first result. To retrieve schema information for multiple results, use <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> with the <see cref="T:System.Data.MissingSchemaAction" /> set to AddWithKey.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Adds or refreshes rows in a <see cref="T:System.Data.DataTable" /> to match those in the data source starting at the specified record and retrieving up to the specified maximum number of records.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The number of rows successfully added to or refreshed in the <see cref="T:System.Data.DataTable" />. This value does not include rows affected by statements that do not return rows.</para>
</returns>
<param name="startRecord">
<attribution license="cc4" from="Microsoft" modified="false" />The zero-based record number to start with. </param>
<param name="maxRecords">
<attribution license="cc4" from="Microsoft" modified="false" />The maximum number of records to retrieve. </param>
<param name="dataTables">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Data.DataTable" /> objects to fill from the data source.</param>
</Docs>
</Member>
<Member MemberName="Fill">
<MemberSignature Language="C#" Value="public int Fill (System.Data.DataSet dataSet, int startRecord, int maxRecords, string srcTable);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataSet" Type="System.Data.DataSet" />
<Parameter Name="startRecord" Type="System.Int32" />
<Parameter Name="maxRecords" Type="System.Int32" />
<Parameter Name="srcTable" Type="System.String" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A <paramref name="maxRecords" /> value of 0 gets all records found after the start record. If <paramref name="maxRecords" /> is greater than the number of remaining rows, only the remaining rows are returned, and no error is issued.</para>
<para>If the corresponding select command is a statement returning multiple results, <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> only applies <paramref name="maxRecords" /> to the first result.</para>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> method retrieves the data from the data source using a SELECT statement. The <see cref="T:System.Data.IDbConnection" /> object associated with the SELECT statement must be valid, but it does not need to be open. If the <see cref="T:System.Data.IDbConnection" /> is closed before <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> is called, it is opened to retrieve data and then closed. If the connection is open before <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> is called, it remains open.</para>
<para>If a command does not return any rows, no tables are added to the <see cref="T:System.Data.DataSet" />, but no exception is raised.</para>
<para>If the <see cref="T:System.Data.Common.DbDataAdapter" /> object encounters duplicate columns while populating a <see cref="T:System.Data.DataTable" />, it will generate names for the subsequent columns, using the pattern "columnname1", "columnname2", "columnname3", and so on. If the incoming data contains unnamed columns, they are placed in the <see cref="T:System.Data.DataSet" /> according to the pattern "Column1", "Column2", and so on.</para>
<para>When the query specified returns multiple results, each result set is placed in a separate table. Additional result sets are named by appending integral values to the specified table name (for example, "Table", "Table1", "Table2", and so on). Because no table is created for a query that does not return rows, if you process an insert query followed by a select query, the table created for the select query is named "Table", because it is the first table created. Applications using column and table names should ensure that conflicts with these naming patterns does not occur.</para>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> method supports scenarios where the <see cref="T:System.Data.DataSet" /> contains multiple <see cref="T:System.Data.DataTable" /> objects whose names differ only by case. In such situations, <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> performs a case-sensitive comparison to find the corresponding table, and creates a new table if no exact match exists. The following C# code illustrates this behavior.</para>
<code>DataSet dataset = new DataSet();
dataset.Tables.Add("aaa");
dataset.Tables.Add("AAA");
adapter.Fill(dataset, "aaa"); // Fills "aaa", which already exists in the DataSet.
adapter.Fill(dataset, "Aaa"); // Adds a new table called "Aaa".</code>
<para>If <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> is called and the <see cref="T:System.Data.DataSet" /> contains only one <see cref="T:System.Data.DataTable" /> whose name differs only by case, that <see cref="T:System.Data.DataTable" /> is updated. In this scenario, the comparison is case insensitive. The following C# code illustrates this behavior.</para>
<code>DataSet dataset = new DataSet();
dataset.Tables.Add("aaa");
adapter.Fill(dataset, "AAA"); // Fills table "aaa" because only one similarly named table is in the DataSet.</code>
<para>If an error or an exception is encountered while populating the data tables, rows added prior to the occurrence of the error remain in the data tables. The remainder of the operation is aborted.</para>
<para>When the SELECT statement used to populate the <see cref="T:System.Data.DataSet" /> returns multiple results, such as batch SQL statements, be aware of the following: </para>
<list type="bullet">
<item>
<para>When processing multiple results from a batch SQL statement, <paramref name="maxRecords" /> only applies to the first result. The same is true for rows containing chaptered results (.NET Framework Data Provider for OLE DB only). The top level result is limited by <paramref name="maxRecords" />, but all child rows are added.</para>
</item>
<item>
<para>If one of the results contains an error, all subsequent results are skipped and not added to the <see cref="T:System.Data.DataSet" />.</para>
</item>
</list>
<para>When using subsequent <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> calls to refresh the contents of the <see cref="T:System.Data.DataSet" />, two conditions must be met: </para>
<list type="ordered">
<item>
<para>The SQL statement should match the one initially used to populate the <see cref="T:System.Data.DataSet" />.</para>
</item>
<item>
<para>The Key column information must be present.</para>
</item>
</list>
<para>If primary key information is present, any duplicate rows will be reconciled and only appear once in the <see cref="T:System.Data.DataTable" /> that corresponds to the <see cref="T:System.Data.DataSet" />. Primary key information may be set either through <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" />, by specifying the <see cref="P:System.Data.DataTable.PrimaryKey" /> property of the <see cref="T:System.Data.DataTable" />, or by setting the <see cref="P:System.Data.Common.DataAdapter.MissingSchemaAction" /> property to AddWithKey.</para>
<para>If the SelectCommand returns the results of an OUTER JOIN, the DataAdapter does not set a <see cref="P:System.Data.DataTable.PrimaryKey" /> value for the resulting <see cref="T:System.Data.DataTable" />. You must explicitly define the primary key to ensure that duplicate rows are resolved correctly. For more information, see <format type="text/html"><a href="2ea85959-e763-4669-8bd9-46a9dab894bd">Defining a Primary Key for a Table</a></format>.</para>
<block subset="none" type="note">
<para>When handling batch SQL statements that return multiple results, the implementation of <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> for the .NET Framework Data Provider for OLE DB retrieves schema information for only the first result. To retrieve schema information for multiple results, use <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> with the <see cref="T:System.Data.MissingSchemaAction" /> set to AddWithKey.</para>
</block>
<block subset="none" type="note">
<para>The DataSet will not contain more than the number of records indicated by <paramref name="maxRecords" />. However, the entire result set generated by the query is still returned from the server.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Adds or refreshes rows in a specified range in the <see cref="T:System.Data.DataSet" /> to match those in the data source using the <see cref="T:System.Data.DataSet" /> and <see cref="T:System.Data.DataTable" /> names.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The number of rows successfully added to or refreshed in the <see cref="T:System.Data.DataSet" />. This does not include rows affected by statements that do not return rows.</para>
</returns>
<param name="dataSet">
<attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Data.DataSet" /> to fill with records and, if necessary, schema. </param>
<param name="startRecord">
<attribution license="cc4" from="Microsoft" modified="false" />The zero-based record number to start with. </param>
<param name="maxRecords">
<attribution license="cc4" from="Microsoft" modified="false" />The maximum number of records to retrieve. </param>
<param name="srcTable">
<attribution license="cc4" from="Microsoft" modified="false" />The name of the source table to use for table mapping. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Fill">
<MemberSignature Language="C#" Value="protected virtual int Fill (System.Data.DataSet dataSet, string srcTable, System.Data.IDataReader dataReader, int startRecord, int maxRecords);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataSet" Type="System.Data.DataSet" />
<Parameter Name="srcTable" Type="System.String" />
<Parameter Name="dataReader" Type="System.Data.IDataReader" />
<Parameter Name="startRecord" Type="System.Int32" />
<Parameter Name="maxRecords" Type="System.Int32" />
</Parameters>
<Docs>
<param name="dataSet">To be added: an object of type 'Data.DataSet'</param>
<param name="srcTable">To be added: an object of type 'string'</param>
<param name="dataReader">To be added: an object of type 'Data.IDataReader'</param>
<param name="startRecord">To be added: an object of type 'int'</param>
<param name="maxRecords">To be added: an object of type 'int'</param>
<summary>To be added</summary>
<returns>To be added: an object of type 'int'</returns>
<remarks>To be added</remarks>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Fill">
<MemberSignature Language="C#" Value="protected virtual int Fill (System.Data.DataTable[] dataTables, int startRecord, int maxRecords, System.Data.IDbCommand command, System.Data.CommandBehavior behavior);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataTables" Type="System.Data.DataTable[]" />
<Parameter Name="startRecord" Type="System.Int32" />
<Parameter Name="maxRecords" Type="System.Int32" />
<Parameter Name="command" Type="System.Data.IDbCommand" />
<Parameter Name="behavior" Type="System.Data.CommandBehavior" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A <paramref name="maxRecords" /> value of 0 gets all records found after the start record. If <paramref name="maxRecords" /> is greater than the number of remaining rows, only the remaining rows are returned and no error is issued.</para>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataTable[],System.Int32,System.Int32,System.Data.IDbCommand,System.Data.CommandBehavior)" /> method retrieves the data from the data source using a SELECT statement. The <see cref="T:System.Data.IDbConnection" /> object associated with the SELECT statement must be valid, but it does not need to be open. If the <see cref="T:System.Data.IDbConnection" /> is closed before <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> is called, it is opened to retrieve data, then closed. If the connection is open before <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> is called, it remains open.</para>
<para>If a command does not return any rows, no tables are added to the <see cref="T:System.Data.DataSet" />, but no exception is raised.</para>
<para>If the <see cref="T:System.Data.Common.DbDataAdapter" /> object encounters duplicate columns while populating a <see cref="T:System.Data.DataTable" />, it will generate names for the subsequent columns, using the pattern "columnname1", "columnname2", "columnname3", and so on. If the incoming data contains unnamed columns, they are placed in the <see cref="T:System.Data.DataSet" /> according to the pattern "Column1", "Column2", and so on.</para>
<para>When the query specified returns multiple results, each result set is placed in a separate table. Additional result sets are named by appending integral values to the specified table name (for example, "Table", "Table1", "Table2", and so on). Since no table is created for a query that does not return rows, if you were to process an insert query followed by a select query, the table created for the select query would be named "Table", because it is the first table created. Applications using column and table names should ensure that conflicts with these naming patterns does not occur.</para>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataTable[],System.Int32,System.Int32,System.Data.IDbCommand,System.Data.CommandBehavior)" /> method supports scenarios where the <see cref="T:System.Data.DataSet" /> contains multiple <see cref="T:System.Data.DataTable" /> objects whose names differ only by case. In such situations, <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> performs a case-sensitive comparison to find the corresponding table, and creates a new table if no exact match exists. The following C# code illustrates this behavior.</para>
<code> DataSet dataset = new DataSet();
dataset.Tables.Add("aaa");
dataset.Tables.Add("AAA");
adapter.Fill(dataset, "aaa"); // Fills "aaa", which already exists in the DataSet.
adapter.Fill(dataset, "Aaa"); // Adds a new table called "Aaa".</code>
<para>If <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> is called and the <see cref="T:System.Data.DataSet" /> contains only one <see cref="T:System.Data.DataTable" /> whose name differs only by case, that <see cref="T:System.Data.DataTable" /> is updated. In this scenario, the comparison is case insensitive. The following C# code illustrates this behavior.</para>
<code> DataSet dataset = new DataSet();
dataset.Tables.Add("aaa");
adapter.Fill(dataset, "AAA"); // Fills table "aaa" because only one similarly named table is in the DataSet.</code>
<para>If an error or an exception is encountered while populating the data tables, rows added prior to the occurrence of the error remain in the data tables. The remainder of the operation is aborted.</para>
<para>When the SELECT statement used to populate the <see cref="T:System.Data.DataTable" /> objects returns multiple results, such as a batch SQL statement, be aware of the following: </para>
<list type="bullet">
<item>
<para>When processing multiple results from a batch SQL statement, <paramref name="maxRecords" /> only applies to the first result. The same is true for rows containing chaptered results (.NET Framework Data Provider for OLE DB only). The top level result is limited by <paramref name="maxRecords" />, but all child rows are added.</para>
</item>
<item>
<para>If one of the results contains an error, all subsequent results are skipped.</para>
</item>
</list>
<block subset="none" type="note">
<para>The DataSet will not contain more than the number of records indicated by <paramref name="maxRecords" />. However, the entire resultset generated by the query is still returned from the server.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Adds or refreshes rows in a specified range in the <see cref="T:System.Data.DataSet" /> to match those in the data source using the <see cref="T:System.Data.DataSet" /> and <see cref="T:System.Data.DataTable" /> names.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The number of rows added to or refreshed in the data tables.</para>
</returns>
<param name="dataTables">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Data.DataTable" /> objects to fill from the data source.</param>
<param name="startRecord">
<attribution license="cc4" from="Microsoft" modified="false" />The zero-based record number to start with.</param>
<param name="maxRecords">
<attribution license="cc4" from="Microsoft" modified="false" />The maximum number of records to retrieve.</param>
<param name="command">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Data.IDbCommand" /> executed to fill the <see cref="T:System.Data.DataTable" /> objects.</param>
<param name="behavior">
<attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Data.CommandBehavior" /> values.</param>
</Docs>
</Member>
<Member MemberName="Fill">
<MemberSignature Language="C#" Value="protected virtual int Fill (System.Data.DataSet dataSet, int startRecord, int maxRecords, string srcTable, System.Data.IDbCommand command, System.Data.CommandBehavior behavior);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataSet" Type="System.Data.DataSet" />
<Parameter Name="startRecord" Type="System.Int32" />
<Parameter Name="maxRecords" Type="System.Int32" />
<Parameter Name="srcTable" Type="System.String" />
<Parameter Name="command" Type="System.Data.IDbCommand" />
<Parameter Name="behavior" Type="System.Data.CommandBehavior" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> method retrieves rows from the data source using the SELECT statement specified by an associated <see cref="P:System.Data.IDbDataAdapter.SelectCommand" /> property. The connection object associated with the SELECT statement must be valid, but it does not need to be open. If the connection is closed before <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> is called, it is opened to retrieve data, then closed. If the connection is open before <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> is called, it remains open.</para>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> operation then adds the rows to destination <see cref="T:System.Data.DataTable" /> objects in the <see cref="T:System.Data.DataSet" />, creating the <see cref="T:System.Data.DataTable" /> objects if they do not already exist. When creating <see cref="T:System.Data.DataTable" /> objects, the <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> operation normally creates only column name metadata. However, if the <see cref="P:System.Data.IDataAdapter.MissingSchemaAction" /> property is set to AddWithKey, appropriate primary keys and constraints are also created.</para>
<para>If the <see cref="T:System.Data.Common.DbDataAdapter" /> encounters duplicate columns while populating a <see cref="T:System.Data.DataTable" />, it generates names for the subsequent columns, using the pattern "columnname1", "columnname2", "columnname3", and so on. If the incoming data contains unnamed columns, they are placed in the <see cref="T:System.Data.DataSet" /> according to the pattern "Column1", "Column2", and so on. When multiple result sets are added to the <see cref="T:System.Data.DataSet" /> each result set is placed in a separate table. Additional result sets are named by appending integral values to the specified table name (for example, "Table", "Table1", "Table2", and so on). Applications using column and table names should ensure that conflicts with these naming patterns does not occur.</para>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> method supports scenarios where the <see cref="T:System.Data.DataSet" /> contains multiple <see cref="T:System.Data.DataTable" /> objects whose names differ only by case. In such situations, <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> performs a case-sensitive comparison to find the corresponding table, and creates a new table if no exact match exists. The following C# code illustrates this behavior.</para>
<code> DataSet dataset = new DataSet();
dataset.Tables.Add("aaa");
dataset.Tables.Add("AAA");
adapter.Fill(dataset, "aaa"); // Fills "aaa", which already exists in the DataSet.
adapter.Fill(dataset, "Aaa"); // Adds a new table called "Aaa".</code>
<para>If <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> is called and the <see cref="T:System.Data.DataSet" /> contains only one <see cref="T:System.Data.DataTable" /> whose name differs only by case, that <see cref="T:System.Data.DataTable" /> is updated. In this scenario, the comparison is case insensitive. The following C# code illustrates this behavior.</para>
<code> DataSet dataset = new DataSet();
dataset.Tables.Add("aaa");
adapter.Fill(dataset, "AAA"); // Fills table "aaa" because only one similarly named table is in the DataSet.</code>
<para>You can use the <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> method multiple times on the same <see cref="T:System.Data.DataTable" />. If a primary key exists, incoming rows are merged with matching rows that already exist. If no primary key exists, incoming rows are appended to the <see cref="T:System.Data.DataTable" />.</para>
<para>If the SelectCommand returns the results of an OUTER JOIN, the DataAdapter does not set a <see cref="P:System.Data.DataTable.PrimaryKey" /> value for the resulting <see cref="T:System.Data.DataTable" />. You must explicitly define the primary key to ensure that duplicate rows are resolved correctly. For more information, see<format type="text/html"><a href="2ea85959-e763-4669-8bd9-46a9dab894bd"> Defining a Primary Key for a Table</a></format>.</para>
<block subset="none" type="note">
<para>When handling batch SQL statements that return multiple results, the implementation of <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> and <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> for a .NET Framework data provider retrieves schema information for only the first result.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Adds or refreshes rows in a specified range in the <see cref="T:System.Data.DataSet" /> to match those in the data source using the <see cref="T:System.Data.DataSet" /> and source table names, command string, and command behavior.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The number of rows successfully added to or refreshed in the <see cref="T:System.Data.DataSet" />. This does not include rows affected by statements that do not return rows.</para>
</returns>
<param name="dataSet">
<attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Data.DataSet" /> to fill with records and, if necessary, schema. </param>
<param name="startRecord">
<attribution license="cc4" from="Microsoft" modified="false" />The zero-based record number to start with. </param>
<param name="maxRecords">
<attribution license="cc4" from="Microsoft" modified="false" />The maximum number of records to retrieve. </param>
<param name="srcTable">
<attribution license="cc4" from="Microsoft" modified="false" />The name of the source table to use for table mapping. </param>
<param name="command">
<attribution license="cc4" from="Microsoft" modified="false" />The SQL SELECT statement used to retrieve rows from the data source. </param>
<param name="behavior">
<attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Data.CommandBehavior" /> values. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="FillCommandBehavior">
<MemberSignature Language="C#" Value="protected System.Data.CommandBehavior FillCommandBehavior { set; get; }" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Data.CommandBehavior</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>To be added.</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets or sets the behavior of the command used to fill the data adapter.</para>
</summary>
</Docs>
</Member>
<Member MemberName="FillError">
<MemberSignature Language="C#" Value="public event System.Data.FillErrorEventHandler FillError;" />
<MemberType>Event</MemberType>
<ReturnValue>
<ReturnType>System.Data.FillErrorEventHandler</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added</summary>
<remarks>To be added</remarks>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Data.DataSysDescription(Description="Event triggered when a recoverable error occurs during Fill.")</AttributeName>
</Attribute>
</Attributes>
</Member>
<Member MemberName="FillSchema">
<MemberSignature Language="C#" Value="public override System.Data.DataTable[] FillSchema (System.Data.DataSet dataSet, System.Data.SchemaType schemaType);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Data.DataTable[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataSet" Type="System.Data.DataSet" />
<Parameter Name="schemaType" Type="System.Data.SchemaType" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This method retrieves the schema information from the data source using the <see cref="P:System.Data.IDbDataAdapter.SelectCommand" />.</para>
<para>A <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> operation adds a <see cref="T:System.Data.DataTable" /> to the destination <see cref="T:System.Data.DataSet" />. It then adds columns to the <see cref="T:System.Data.DataColumnCollection" /> of the <see cref="T:System.Data.DataTable" />, and configures the following <see cref="T:System.Data.DataColumn" /> properties if they exist at the data source: </para>
<list type="bullet">
<item>
<para>
<see cref="P:System.Data.DataColumn.AllowDBNull" /> </para>
</item>
<item>
<para>
<see cref="P:System.Data.DataColumn.AutoIncrement" />. You must set <see cref="P:System.Data.DataColumn.AutoIncrementStep" /> and <see cref="P:System.Data.DataColumn.AutoIncrementSeed" /> separately.</para>
</item>
<item>
<para>
<see cref="P:System.Data.DataColumn.MaxLength" /> </para>
</item>
<item>
<para>
<see cref="P:System.Data.DataColumn.ReadOnly" /> </para>
</item>
<item>
<para>
<see cref="P:System.Data.DataColumn.Unique" /> </para>
</item>
</list>
<para>
<see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> also configures the <see cref="P:System.Data.DataTable.PrimaryKey" /> and <see cref="P:System.Data.DataTable.Constraints" /> properties according to the following rules: </para>
<list type="bullet">
<item>
<para>If one or more primary key columns are returned by the <see cref="P:System.Data.IDbDataAdapter.SelectCommand" />, they are used as the primary key columns for the <see cref="T:System.Data.DataTable" />.</para>
</item>
<item>
<para>If no primary key columns are returned but unique columns are, the unique columns are used as the primary key if, and only if, all the unique columns are nonnullable. If any of the columns are nullable, a <see cref="T:System.Data.UniqueConstraint" /> is added to the <see cref="T:System.Data.ConstraintCollection" />, but the <see cref="P:System.Data.DataTable.PrimaryKey" /> property is not set.</para>
</item>
<item>
<para>If both primary key columns and unique columns are returned, the primary key columns are used as the primary key columns for the <see cref="T:System.Data.DataTable" />.</para>
</item>
</list>
<para>Note that primary keys and unique constraints are added to the <see cref="T:System.Data.ConstraintCollection" /> according to the preceding rules, but other constraint types are not added.</para>
<para>If a unique clustered index is defined on a column or columns in a SQL Server table and the primary key constraint is defined on a separate set of columns, then the names of the columns in the clustered index will be returned. To return the name or names of the primary key columns, use a query hint with the SELECT statement that specifies the name of the primary key index. For more information about specifying query hints, see <see cref="http://msdn.microsoft.com/library/ms181714.aspx">Query Hint (Transact-SQL)</see>.</para>
<para>Primary key information is used during <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> to find and replace any rows whose key columns match. If this is not the desired behavior, use <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> without requesting schema information.</para>
<para>If the <see cref="T:System.Data.IDataAdapter" /> encounters duplicate columns while populating a <see cref="T:System.Data.DataTable" />, it generates names for the subsequent columns, using the pattern "columnname1", "columnname2", "columnname3", and so on. If the incoming data contains unnamed columns, they are placed in the <see cref="T:System.Data.DataSet" /> according to the pattern "Column1", "Column2", and so on. When multiple result sets are added to the <see cref="T:System.Data.DataSet" /> each result set is placed in a separate table. Additional result sets are named by appending integral values to the specified table name (for example, "Table", "Table1", "Table2", and so on.). Applications using column and table names should ensure that conflicts with these naming patterns does not occur.</para>
<para>The <see cref="T:System.Data.IDbConnection" /> object associated with the select command must be valid, but it does not need to open. If the <see cref="T:System.Data.IDbConnection" /> is closed before <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> is called, it is opened to retrieve data, then closed. If the connection is open before <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> is called, it is left open.</para>
<block subset="none" type="note">
<para>When handling batch SQL statements that return multiple results, the implementation of <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> for the .NET Framework Data Provider for OLE DB retrieves schema information for only the first result. To retrieve schema information for multiple results, use <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> with the <see cref="T:System.Data.MissingSchemaAction" /> set to AddWithKey.</para>
</block>
<para>When using <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" />, the .NET Framework Data Provider for SQL Server appends a FOR BROWSE clause to the statement being executed. The user should be aware of potential side effects, such as interference with the use of SET FMTONLY ON statements. See SQL Server Books Online for more information.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Adds a <see cref="T:System.Data.DataTable" /> named "Table" to the specified <see cref="T:System.Data.DataSet" /> and configures the schema to match that in the data source based on the specified <see cref="T:System.Data.SchemaType" />.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A reference to a collection of <see cref="T:System.Data.DataTable" /> objects that were added to the <see cref="T:System.Data.DataSet" />.</para>
</returns>
<param name="dataSet">
<attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Data.DataSet" /> to insert the schema in. </param>
<param name="schemaType">
<attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Data.SchemaType" /> values that specify how to insert the schema. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="FillSchema">
<MemberSignature Language="C#" Value="public System.Data.DataTable FillSchema (System.Data.DataTable dataTable, System.Data.SchemaType schemaType);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Data.DataTable</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataTable" Type="System.Data.DataTable" />
<Parameter Name="schemaType" Type="System.Data.SchemaType" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> method retrieves the schema from the data source using the <see cref="P:System.Data.IDbDataAdapter.SelectCommand" />. The connection object associated with the <see cref="P:System.Data.IDbDataAdapter.SelectCommand" /> must be valid, but it does not need to be open. If the connection is closed before <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> is called, it is opened to retrieve data, then closed. If the connection is open before <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> is called, it remains open.</para>
<para>A <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> operation returns a <see cref="T:System.Data.DataTable" />. It then adds columns to the <see cref="T:System.Data.DataColumnCollection" /> of the <see cref="T:System.Data.DataTable" />, and configures the following <see cref="T:System.Data.DataColumn" /> properties if they exist at the data source: </para>
<list type="bullet">
<item>
<para>
<see cref="P:System.Data.DataColumn.AllowDBNull" /> </para>
</item>
<item>
<para>
<see cref="P:System.Data.DataColumn.AutoIncrement" />. You must set <see cref="P:System.Data.DataColumn.AutoIncrementStep" /> and <see cref="P:System.Data.DataColumn.AutoIncrementSeed" /> separately.</para>
</item>
<item>
<para>
<see cref="P:System.Data.DataColumn.MaxLength" /> </para>
</item>
<item>
<para>
<see cref="P:System.Data.DataColumn.ReadOnly" /> </para>
</item>
<item>
<para>
<see cref="P:System.Data.DataColumn.Unique" /> </para>
</item>
</list>
<para>
<see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> also configures the <see cref="P:System.Data.DataTable.PrimaryKey" /> and <see cref="P:System.Data.DataTable.Constraints" /> properties according to the following rules: </para>
<list type="bullet">
<item>
<para>If a <see cref="P:System.Data.DataTable.PrimaryKey" /> has already been defined for the DataTable, or the DataTable contains data, the PrimaryKey property will not be set.</para>
</item>
<item>
<para>If one or more primary key columns are returned by the <see cref="P:System.Data.IDbDataAdapter.SelectCommand" />, they are used as the primary key columns for the DataTable.</para>
</item>
<item>
<para>If no primary key columns are returned but unique columns are, the unique columns are used as the primary key if, and only if, all the unique columns are nonnullable. If any of the columns are nullable, a <see cref="T:System.Data.UniqueConstraint" /> is added to the <see cref="T:System.Data.ConstraintCollection" />, but the PrimaryKey property is not set.</para>
</item>
<item>
<para>If both primary key columns and unique columns are returned, the primary key columns are used as the primary key columns for the DataTable.</para>
</item>
</list>
<para>Note that primary keys and unique constraints are added to the <see cref="T:System.Data.ConstraintCollection" /> according to the preceding rules, but other constraint types are not added. This process may require several round-trips to the server.</para>
<para>If a unique clustered index is defined on a column or columns in a SQL Server table and the primary key constraint is defined on a separate set of columns, then the names of the columns in the clustered index will be returned. To return the name or names of the primary key columns, use a query hint with the SELECT statement that specifies the name of the primary key index. For more information about specifying query hints, see <see cref="http://msdn.microsoft.com/library/ms181714.aspx">Query Hint (Transact-SQL)</see>.</para>
<para>If the <see cref="T:System.Data.Common.DbDataAdapter" /> encounters duplicate columns while populating a <see cref="T:System.Data.DataTable" />, it generates names for the subsequent columns, using the pattern "columnname1", "columnname2", "columnname3", and so on. If the incoming data contains unnamed columns, they are placed in the <see cref="T:System.Data.DataSet" /> according to the pattern "Column1", "Column2", and so on. When multiple result sets are added to the <see cref="T:System.Data.DataSet" /> each result set is placed in a separate table. Additional result sets are named by appending integral values to the specified table name (for example, "Table", "Table1", "Table2", and so on.). Applications using column and table names should ensure that conflicts with these naming patterns does not occur.</para>
<para>
<see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> does not return any rows. Use the <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> method to add rows to a <see cref="T:System.Data.DataTable" />.</para>
<block subset="none" type="note">
<para>When handling batch SQL statements that return multiple results, the implementation of <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> for the .NET Framework Data Provider for OLE DB retrieves schema information for only the first result. To retrieve schema information for multiple results, use <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> with the <see cref="T:System.Data.MissingSchemaAction" /> set to AddWithKey.</para>
</block>
<para>When using <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" />, the .NET Framework Data Provider for SQL Server appends a FOR BROWSE clause to the statement being executed. The user should be aware of potential side effects, such as interference with the use of SET FMTONLY ON statements. See SQL Server Books Online for more information.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Configures the schema of the specified <see cref="T:System.Data.DataTable" /> based on the specified <see cref="T:System.Data.SchemaType" />.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A <see cref="T:System.Data.DataTable" /> that contains schema information returned from the data source.</para>
</returns>
<param name="dataTable">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Data.DataTable" /> to be filled with the schema from the data source. </param>
<param name="schemaType">
<attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Data.SchemaType" /> values. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="FillSchema">
<MemberSignature Language="C#" Value="public System.Data.DataTable[] FillSchema (System.Data.DataSet dataSet, System.Data.SchemaType schemaType, string srcTable);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Data.DataTable[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataSet" Type="System.Data.DataSet" />
<Parameter Name="schemaType" Type="System.Data.SchemaType" />
<Parameter Name="srcTable" Type="System.String" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This method retrieves the schema information from the data source using the <see cref="P:System.Data.IDbDataAdapter.SelectCommand" />.</para>
<para>A <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> operation adds a <see cref="T:System.Data.DataTable" /> to the destination <see cref="T:System.Data.DataSet" />. It then adds columns to the <see cref="T:System.Data.DataColumnCollection" /> of the <see cref="T:System.Data.DataTable" />, and configures the following <see cref="T:System.Data.DataColumn" /> properties if they exist at the data source: </para>
<list type="bullet">
<item>
<para>
<see cref="P:System.Data.DataColumn.AllowDBNull" /> </para>
</item>
<item>
<para>
<see cref="P:System.Data.DataColumn.AutoIncrement" />. You must set <see cref="P:System.Data.DataColumn.AutoIncrementStep" /> and <see cref="P:System.Data.DataColumn.AutoIncrementSeed" /> separately.</para>
</item>
<item>
<para>
<see cref="P:System.Data.DataColumn.MaxLength" /> </para>
</item>
<item>
<para>
<see cref="P:System.Data.DataColumn.ReadOnly" /> </para>
</item>
<item>
<para>
<see cref="P:System.Data.DataColumn.Unique" /> </para>
</item>
</list>
<para>
<see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> also configures the <see cref="P:System.Data.DataTable.PrimaryKey" /> and <see cref="P:System.Data.DataTable.Constraints" /> properties according to the following rules: </para>
<list type="bullet">
<item>
<para>If one or more primary key columns are returned by the <see cref="P:System.Data.IDbDataAdapter.SelectCommand" />, they are used as the primary key columns for the <see cref="T:System.Data.DataTable" />.</para>
</item>
<item>
<para>If no primary key columns are returned but unique columns are, the unique columns are used as the primary key if, and only if, all the unique columns are nonnullable. If any of the columns are nullable, a <see cref="T:System.Data.UniqueConstraint" /> is added to the <see cref="T:System.Data.ConstraintCollection" />, but the <see cref="P:System.Data.DataTable.PrimaryKey" /> property is not set.</para>
</item>
<item>
<para>If both primary key columns and unique columns are returned, the primary key columns are used as the primary key columns for the <see cref="T:System.Data.DataTable" />.</para>
</item>
</list>
<para>Note that primary keys and unique constraints are added to the <see cref="T:System.Data.ConstraintCollection" /> according to the preceding rules, but other constraint types are not added.</para>
<para>If a unique clustered index is defined on a column or columns in a SQL Server table and the primary key constraint is defined on a separate set of columns, then the names of the columns in the clustered index will be returned. To return the name or names of the primary key columns, use a query hint with the SELECT statement that specifies the name of the primary key index. For more information about specifying query hints, see <see cref="http://msdn.microsoft.com/library/ms181714.aspx">Query Hint (Transact-SQL)</see>.</para>
<para>Primary key information is used during <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> to find and replace any rows whose key columns match. If this is not the desired behavior, use <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> without requesting schema information.</para>
<para>If the <see cref="T:System.Data.Common.DbDataAdapter" /> encounters duplicate columns while populating a <see cref="T:System.Data.DataTable" />, it generates names for the subsequent columns, using the pattern "columnname1", "columnname2", "columnname3", and so on. If the incoming data contains unnamed columns, they are placed in the <see cref="T:System.Data.DataSet" /> according to the pattern "Column1", "Column2", and so on. When multiple result sets are added to the <see cref="T:System.Data.DataSet" /> each result set is placed in a separate table. Additional result sets are named by appending integral values to the specified table name (for example, "Table", "Table1", "Table2", and so on.). Applications using column and table names should ensure that conflicts with these naming patterns does not occur.</para>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> method supports scenarios where the <see cref="T:System.Data.DataSet" /> contains multiple <see cref="T:System.Data.DataTable" /> objects whose names differ only by case. In such situations, <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> performs a case-sensitive comparison to find the corresponding table, and creates a new table if no exact match exists. The following C# code illustrates this behavior.</para>
<code> DataSet dataset = new DataSet();
dataset.Tables.Add("aaa");
dataset.Tables.Add("AAA");
adapter.FillSchema(dataset, "aaa"); // Fills the schema of "aaa", which already exists in the DataSet.
adapter.FillSchema(dataset, "Aaa"); // Adds a new table called "Aaa".</code>
<para>If <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> is called and the <see cref="T:System.Data.DataSet" /> contains only one <see cref="T:System.Data.DataTable" /> whose name differs only by case, that <see cref="T:System.Data.DataTable" /> is updated. In this scenario, the comparison is case insensitive. The following C# code illustrates this behavior.</para>
<code> DataSet dataset = new DataSet();
dataset.Tables.Add("aaa");
adapter.FillSchema(dataset, "AAA"); // Fills the schema of table "aaa" because only one similarly named table is in the DataSet.</code>
<para>The <see cref="T:System.Data.IDbConnection" /> object associated with the select command must be valid, but it does not need to open. If the <see cref="T:System.Data.IDbConnection" /> is closed before <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> is called, it is opened to retrieve data, then closed. If the connection is open before <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> is called, it is left open.</para>
<block subset="none" type="note">
<para>When handling batch SQL statements that return multiple results, the implementation of <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> for the .NET Framework Data Provider for OLE DB retrieves schema information for only the first result. To retrieve schema information for multiple results, use <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> with the <see cref="T:System.Data.MissingSchemaAction" /> set to AddWithKey.</para>
</block>
<para>When using <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" />, the .NET Framework Data Provider for SQL Server appends a FOR BROWSE clause to the statement being executed. The user should be aware of potential side effects, such as interference with the use of SET FMTONLY ON statements. See SQL Server Books Online for more information.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Adds a <see cref="T:System.Data.DataTable" /> to the specified <see cref="T:System.Data.DataSet" /> and configures the schema to match that in the data source based upon the specified <see cref="T:System.Data.SchemaType" /> and <see cref="T:System.Data.DataTable" />.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A reference to a collection of <see cref="T:System.Data.DataTable" /> objects that were added to the <see cref="T:System.Data.DataSet" />.</para>
</returns>
<param name="dataSet">
<attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Data.DataSet" /> to insert the schema in. </param>
<param name="schemaType">
<attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Data.SchemaType" /> values that specify how to insert the schema. </param>
<param name="srcTable">
<attribution license="cc4" from="Microsoft" modified="false" />The name of the source table to use for table mapping. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="FillSchema">
<MemberSignature Language="C#" Value="protected virtual System.Data.DataTable FillSchema (System.Data.DataTable dataTable, System.Data.SchemaType schemaType, System.Data.IDbCommand command, System.Data.CommandBehavior behavior);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Data.DataTable</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataTable" Type="System.Data.DataTable" />
<Parameter Name="schemaType" Type="System.Data.SchemaType" />
<Parameter Name="command" Type="System.Data.IDbCommand" />
<Parameter Name="behavior" Type="System.Data.CommandBehavior" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> method retrieves the schema from the data source using the <see cref="P:System.Data.IDbDataAdapter.SelectCommand" />. The connection object associated with the <see cref="P:System.Data.IDbDataAdapter.SelectCommand" /> must be valid, but it does not need to be open. If the connection is closed before <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> is called, it is opened to retrieve data, then closed. If the connection is open before <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> is called, it remains open.</para>
<para>A <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> operation adds a <see cref="T:System.Data.DataTable" /> to the destination <see cref="T:System.Data.DataSet" />. It then adds columns to the <see cref="T:System.Data.DataColumnCollection" /> of the <see cref="T:System.Data.DataTable" />, and configures the following <see cref="T:System.Data.DataColumn" /> properties if they exist at the data source: </para>
<list type="bullet">
<item>
<para>
<see cref="P:System.Data.DataColumn.AllowDBNull" /> </para>
</item>
<item>
<para>
<see cref="P:System.Data.DataColumn.AutoIncrement" />. You must set <see cref="P:System.Data.DataColumn.AutoIncrementStep" /> and <see cref="P:System.Data.DataColumn.AutoIncrementSeed" /> separately.</para>
</item>
<item>
<para>
<see cref="P:System.Data.DataColumn.MaxLength" /> </para>
</item>
<item>
<para>
<see cref="P:System.Data.DataColumn.ReadOnly" /> </para>
</item>
<item>
<para>
<see cref="P:System.Data.DataColumn.Unique" /> </para>
</item>
</list>
<para>
<see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> also configures the <see cref="P:System.Data.DataTable.PrimaryKey" /> and <see cref="P:System.Data.DataTable.Constraints" /> properties according to the following rules: </para>
<list type="bullet">
<item>
<para>If one or more primary key columns are returned by the <see cref="P:System.Data.IDbDataAdapter.SelectCommand" />, they are used as the primary key columns for the <see cref="T:System.Data.DataTable" />.</para>
</item>
<item>
<para>If no primary key columns are returned but unique columns are, the unique columns are used as the primary key if, and only if, all the unique columns are nonnullable. If any of the columns are nullable, a <see cref="T:System.Data.UniqueConstraint" /> is added to the <see cref="T:System.Data.ConstraintCollection" />, but the <see cref="P:System.Data.DataTable.PrimaryKey" /> property is not set.</para>
</item>
<item>
<para>If both primary key columns and unique columns are returned, the primary key columns are used as the primary key columns for the <see cref="T:System.Data.DataTable" />.</para>
</item>
</list>
<para>Note that primary keys and unique constraints are added to the <see cref="T:System.Data.ConstraintCollection" /> according to the preceding rules, but other constraint types are not added.</para>
<para>If a unique clustered index is defined on a column or columns in a SQL Server table and the primary key constraint is defined on a separate set of columns, then the names of the columns in the clustered index will be returned. To return the name or names of the primary key columns, use a query hint with the SELECT statement that specifies the name of the primary key index. For more information about specifying query hints, see <see cref="http://msdn.microsoft.com/library/ms181714.aspx">Query Hint (Transact-SQL)</see>.</para>
<para>If the <see cref="T:System.Data.IDataAdapter" /> encounters duplicate columns while populating a <see cref="T:System.Data.DataTable" />, it generates names for the subsequent columns, using the pattern "columnname1", "columnname2", "columnname3", and so on. If the incoming data contains unnamed columns, they are placed in the <see cref="T:System.Data.DataSet" /> according to the pattern "Column1", "Column2", and so on. When multiple result sets are added to the <see cref="T:System.Data.DataSet" /> each result set is placed in a separate table. Additional result sets are named by appending integral values to the specified table name (for example, "Table", "Table1", "Table2", and so on.). Applications using column and table names should ensure that conflicts with these naming patterns does not occur.</para>
<para>
<see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> does not return any rows. Use the <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> method to add rows to a <see cref="T:System.Data.DataTable" />.</para>
<block subset="none" type="note">
<para>When handling batch SQL statements that return multiple results, the implementation of <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> for the .NET Framework Data Provider for OLE DB retrieves schema information for only the first result. To retrieve schema information for multiple results, use <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> with the <see cref="T:System.Data.MissingSchemaAction" /> set to AddWithKey.</para>
</block>
<para>When using <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" />, the .NET Framework Data Provider for SQL Server appends a FOR BROWSE clause to the statement being executed. The user should be aware of potential side effects, such as interference with the use of SET FMTONLY ON statements. See SQL Server Books Online for more information.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Configures the schema of the specified <see cref="T:System.Data.DataTable" /> based on the specified <see cref="T:System.Data.SchemaType" />, command string, and <see cref="T:System.Data.CommandBehavior" /> values.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A of <see cref="T:System.Data.DataTable" /> object that contains schema information returned from the data source.</para>
</returns>
<param name="dataTable">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Data.DataTable" /> to be filled with the schema from the data source. </param>
<param name="schemaType">
<attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Data.SchemaType" /> values. </param>
<param name="command">
<attribution license="cc4" from="Microsoft" modified="false" />The SQL SELECT statement used to retrieve rows from the data source. </param>
<param name="behavior">
<attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Data.CommandBehavior" /> values. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="FillSchema">
<MemberSignature Language="C#" Value="protected virtual System.Data.DataTable[] FillSchema (System.Data.DataSet dataSet, System.Data.SchemaType schemaType, System.Data.IDbCommand command, string srcTable, System.Data.CommandBehavior behavior);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Data.DataTable[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataSet" Type="System.Data.DataSet" />
<Parameter Name="schemaType" Type="System.Data.SchemaType" />
<Parameter Name="command" Type="System.Data.IDbCommand" />
<Parameter Name="srcTable" Type="System.String" />
<Parameter Name="behavior" Type="System.Data.CommandBehavior" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> method retrieves the schema from the data source using the <see cref="P:System.Data.IDbDataAdapter.SelectCommand" />. The connection object associated with the <see cref="P:System.Data.IDbDataAdapter.SelectCommand" /> must be valid, but it does not need to be open. If the connection is closed before <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> is called, it is opened to retrieve data, then closed. If the connection is open before <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> is called, it remains open.</para>
<para>A <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> operation adds a <see cref="T:System.Data.DataTable" /> to the destination <see cref="T:System.Data.DataSet" />. It then adds columns to the <see cref="T:System.Data.DataColumnCollection" /> of the <see cref="T:System.Data.DataTable" />, and configures the following <see cref="T:System.Data.DataColumn" /> properties if they exist at the data source: </para>
<list type="bullet">
<item>
<para>
<see cref="P:System.Data.DataColumn.AllowDBNull" /> </para>
</item>
<item>
<para>
<see cref="P:System.Data.DataColumn.AutoIncrement" />. You must set <see cref="P:System.Data.DataColumn.AutoIncrementStep" /> and <see cref="P:System.Data.DataColumn.AutoIncrementSeed" /> separately.</para>
</item>
<item>
<para>
<see cref="P:System.Data.DataColumn.MaxLength" /> </para>
</item>
<item>
<para>
<see cref="P:System.Data.DataColumn.ReadOnly" /> </para>
</item>
<item>
<para>
<see cref="P:System.Data.DataColumn.Unique" /> </para>
</item>
</list>
<para>
<see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> also configures the <see cref="P:System.Data.DataTable.PrimaryKey" /> and <see cref="P:System.Data.DataTable.Constraints" /> properties according to the following rules: </para>
<list type="bullet">
<item>
<para>If one or more primary key columns are returned by the <see cref="P:System.Data.IDbDataAdapter.SelectCommand" />, they are used as the primary key columns for the <see cref="T:System.Data.DataTable" />.</para>
</item>
<item>
<para>If no primary key columns are returned but unique columns are, the unique columns are used as the primary key if, and only if, all the unique columns are nonnullable. If any of the columns are nullable, a <see cref="T:System.Data.UniqueConstraint" /> is added to the <see cref="T:System.Data.ConstraintCollection" />, but the <see cref="P:System.Data.DataTable.PrimaryKey" /> property is not set.</para>
</item>
<item>
<para>If both primary key columns and unique columns are returned, the primary key columns are used as the primary key columns for the <see cref="T:System.Data.DataTable" />.</para>
</item>
</list>
<para>Note that primary keys and unique constraints are added to the <see cref="T:System.Data.ConstraintCollection" /> according to the preceding rules, but other constraint types are not added.</para>
<para>If a unique clustered index is defined on a column or columns in a SQL Server table and the primary key constraint is defined on a separate set of columns, then the names of the columns in the clustered index will be returned. To return the name or names of the primary key columns, use a query hint with the SELECT statement that specifies the name of the primary key index. For more information about specifying query hints, see <see cref="http://msdn.microsoft.com/library/ms181714.aspx">Query Hint (Transact-SQL)</see>.</para>
<para>If the <see cref="T:System.Data.IDataAdapter" /> encounters duplicate columns while populating a <see cref="T:System.Data.DataTable" />, it generates names for the subsequent columns, using the pattern "columnname1", "columnname2", "columnname3", and so on. If the incoming data contains unnamed columns, they are placed in the <see cref="T:System.Data.DataSet" /> according to the pattern "Column1", "Column2", and so on. When multiple result sets are added to the <see cref="T:System.Data.DataSet" /> each result set is placed in a separate table. Additional result sets are named by appending integral values to the specified table name (for example, "Table", "Table1", "Table2", and so on.). Applications using column and table names should ensure that conflicts with these naming patterns does not occur.</para>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> method supports scenarios where the <see cref="T:System.Data.DataSet" /> contains multiple <see cref="T:System.Data.DataTable" /> objects whose names differ only by case. In such situations, <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> performs a case-sensitive comparison to find the corresponding table, and creates a new table if no exact match exists. The following C# code illustrates this behavior.</para>
<code> DataSet dataset = new DataSet();
dataset.Tables.Add("aaa");
dataset.Tables.Add("AAA");
adapter.FillSchema(dataset, "aaa"); // Fills the schema of "aaa", which already exists in the DataSet.
adapter.FillSchema(dataset, "Aaa"); // Adds a new table called "Aaa".</code>
<para>If <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> is called and the <see cref="T:System.Data.DataSet" /> contains only one <see cref="T:System.Data.DataTable" /> whose name differs only by case, that <see cref="T:System.Data.DataTable" /> is updated. In this scenario, the comparison is case insensitive. The following C# code illustrates this behavior.</para>
<code> DataSet dataset = new DataSet();
dataset.Tables.Add("aaa");
adapter.FillSchema(dataset, "AAA"); // Fills the schema of table "aaa" because only one similarly named table is in the DataSet.</code>
<para>
<see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> does not return any rows. Use the <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> method to add rows to a <see cref="T:System.Data.DataTable" />.</para>
<block subset="none" type="note">
<para>When handling batch SQL statements that return multiple results, the implementation of <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" /> for the .NET Framework Data Provider for OLE DB retrieves schema information for only the first result. To retrieve schema information for multiple results, use <see cref="M:System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)" /> with the <see cref="T:System.Data.MissingSchemaAction" /> set to AddWithKey.</para>
</block>
<para>When using <see cref="M:System.Data.Common.DbDataAdapter.FillSchema(System.Data.DataTable,System.Data.SchemaType)" />, the .NET Framework Data Provider for SQL Server appends a FOR BROWSE clause to the statement being executed. The user should be aware of potential side effects, such as interference with the use of SET FMTONLY ON statements. See SQL Server Books Online for more information.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Adds a <see cref="T:System.Data.DataTable" /> to the specified <see cref="T:System.Data.DataSet" /> and configures the schema to match that in the data source based on the specified <see cref="T:System.Data.SchemaType" />.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An array of <see cref="T:System.Data.DataTable" /> objects that contain schema information returned from the data source.</para>
</returns>
<param name="dataSet">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Data.DataSet" /> to be filled with the schema from the data source. </param>
<param name="schemaType">
<attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Data.SchemaType" /> values. </param>
<param name="command">
<attribution license="cc4" from="Microsoft" modified="false" />The SQL SELECT statement used to retrieve rows from the data source. </param>
<param name="srcTable">
<attribution license="cc4" from="Microsoft" modified="false" />The name of the source table to use for table mapping. </param>
<param name="behavior">
<attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Data.CommandBehavior" /> values. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="GetBatchedParameter">
<MemberSignature Language="C#" Value="protected virtual System.Data.IDataParameter GetBatchedParameter (int commandIdentifier, int parameterIndex);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Data.IDataParameter</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="commandIdentifier" Type="System.Int32" />
<Parameter Name="parameterIndex" Type="System.Int32" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>In <see cref="T:System.Data.Common.DbDataAdapter" />, this method throws <see cref="T:System.NotSupportedException" />. Classes that inherit from <see cref="T:System.Data.Common.DbDataAdapter" /> override this method to provide support for batches.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns a <see cref="T:System.Data.IDataParameter" /> from one of the commands in the current batch.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="T:System.Data.IDataParameter" /> specified.</para>
</returns>
<param name="commandIdentifier">
<attribution license="cc4" from="Microsoft" modified="false" />The index of the command to retrieve the parameter from.</param>
<param name="parameterIndex">
<attribution license="cc4" from="Microsoft" modified="false" />The index of the parameter within the command.</param>
</Docs>
</Member>
<Member MemberName="GetBatchedRecordsAffected">
<MemberSignature Language="C#" Value="protected virtual bool GetBatchedRecordsAffected (int commandIdentifier, out int recordsAffected, out Exception error);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="commandIdentifier" Type="System.Int32" />
<Parameter Name="recordsAffected" Type="System.Int32&" RefType="out" />
<Parameter Name="error" Type="System.Exception&" RefType="out" />
</Parameters>
<Docs>
<param name="commandIdentifier">To be added.</param>
<param name="recordsAffected">To be added.</param>
<param name="error">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetFillParameters">
<MemberSignature Language="C#" Value="public override System.Data.IDataParameter[] GetFillParameters ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Data.IDataParameter[]</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>To be added</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the parameters set by the user when executing an SQL SELECT statement.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An array of <see cref="T:System.Data.IDataParameter" /> objects that contains the parameters set by the user.</para>
</returns>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
</Attribute>
</Attributes>
</Member>
<Member MemberName="InitializeBatching">
<MemberSignature Language="C#" Value="protected virtual void InitializeBatching ();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>In <see cref="T:System.Data.Common.DbDataAdapter" />, this method throws <see cref="T:System.NotSupportedException" />. Classes that inherit from <see cref="T:System.Data.Common.DbDataAdapter" /> override this method to provide support for batches.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes batching for the <see cref="T:System.Data.Common.DbDataAdapter" />.</para>
</summary>
</Docs>
</Member>
<Member MemberName="InsertCommand">
<MemberSignature Language="C#" Value="public System.Data.Common.DbCommand InsertCommand { set; get; }" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Data.Common.DbCommand</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>During <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" />, if this property is not set and primary key information is present in the <see cref="T:System.Data.DataSet" />, the <see cref="P:System.Data.IDbDataAdapter.InsertCommand" /> will be automatically generated.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets or sets a command used to insert new records into the data source.</para>
</summary>
</Docs>
</Member>
<Member MemberName="OnFillError">
<MemberSignature Language="C#" Value="protected virtual void OnFillError (System.Data.FillErrorEventArgs value);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Data.FillErrorEventArgs" />
</Parameters>
<Docs>
<param name="value">To be added: an object of type 'Data.FillErrorEventArgs'</param>
<summary>To be added</summary>
<remarks>To be added</remarks>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="OnRowUpdated">
<MemberSignature Language="C#" Value="protected virtual void OnRowUpdated (System.Data.Common.RowUpdatedEventArgs value);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Data.Common.RowUpdatedEventArgs" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Raising an event invokes the event handler through a delegate. For an overview, see <format type="text/html"><a href="f2adaf01-1ed1-42e1-8c31-8d467e7e0ee2">Raising an Event</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Raises the RowUpdated event of a .NET Framework data provider.</para>
</summary>
<param name="value">
<attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Data.Common.RowUpdatedEventArgs" /> that contains the event data. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="OnRowUpdating">
<MemberSignature Language="C#" Value="protected virtual void OnRowUpdating (System.Data.Common.RowUpdatingEventArgs value);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Data.Common.RowUpdatingEventArgs" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Raising an event invokes the event handler through a delegate. For an overview, see <format type="text/html"><a href="f2adaf01-1ed1-42e1-8c31-8d467e7e0ee2">Raising an Event</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Raises the RowUpdating event of a .NET Framework data provider.</para>
</summary>
<param name="value">
<attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.Data.Common.RowUpdatingEventArgs" /> that contains the event data. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="SelectCommand">
<MemberSignature Language="C#" Value="public System.Data.Common.DbCommand SelectCommand { set; get; }" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Data.Common.DbCommand</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>To be added.</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets or sets a command used to select records in the data source.</para>
</summary>
</Docs>
</Member>
<Member MemberName="System.Data.IDbDataAdapter.DeleteCommand">
<MemberSignature Language="C#" Value="System.Data.IDbCommand System.Data.IDbDataAdapter.DeleteCommand { set; get; }" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Data.IDbCommand</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This member is an explicit interface member implementation. It can be used only when the <see cref="T:System.Data.Common.DbDataAdapter" /> instance is cast to an <see cref="T:System.Data.IDbDataAdapter" /> interface.</para>
<para>For more information, see <see cref="P:System.Data.IDbDataAdapter.DeleteCommand" />.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets or sets an SQL statement for deleting records from the data set.</para>
</summary>
</Docs>
</Member>
<Member MemberName="System.Data.IDbDataAdapter.InsertCommand">
<MemberSignature Language="C#" Value="System.Data.IDbCommand System.Data.IDbDataAdapter.InsertCommand { set; get; }" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Data.IDbCommand</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This member is an explicit interface member implementation. It can be used only when the <see cref="T:System.Data.Common.DbDataAdapter" /> instance is cast to an <see cref="T:System.Data.IDbDataAdapter" /> interface.</para>
<para>For more information, see <see cref="P:System.Data.IDbDataAdapter.InsertCommand" />.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets or sets an SQL statement used to insert new records into the data source.</para>
</summary>
</Docs>
</Member>
<Member MemberName="System.Data.IDbDataAdapter.SelectCommand">
<MemberSignature Language="C#" Value="System.Data.IDbCommand System.Data.IDbDataAdapter.SelectCommand { set; get; }" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Data.IDbCommand</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This member is an explicit interface member implementation. It can be used only when the <see cref="T:System.Data.Common.DbDataAdapter" /> instance is cast to an <see cref="T:System.Data.IDbDataAdapter" /> interface.</para>
<para>For more information, see <see cref="P:System.Data.IDbDataAdapter.SelectCommand" />.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets or sets an SQL statement used to select records in the data source.</para>
</summary>
</Docs>
</Member>
<Member MemberName="System.Data.IDbDataAdapter.UpdateCommand">
<MemberSignature Language="C#" Value="System.Data.IDbCommand System.Data.IDbDataAdapter.UpdateCommand { set; get; }" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Data.IDbCommand</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This member is an explicit interface member implementation. It can be used only when the <see cref="T:System.Data.Common.DbDataAdapter" /> instance is cast to an <see cref="T:System.Data.IDbDataAdapter" /> interface.</para>
<para>For more information, see <see cref="P:System.Data.IDbDataAdapter.UpdateCommand" />.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets or sets an SQL statement used to update records in the data source.</para>
</summary>
</Docs>
</Member>
<Member MemberName="System.ICloneable.Clone">
<MemberSignature Language="C#" Value="object ICloneable.Clone ();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Obsolete("use 'protected DbDataAdapter(DbDataAdapter)' ctor")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This member is an explicit interface member implementation. It can be used only when the <see cref="T:System.Data.Common.DbDataAdapter" /> instance is cast to an <see cref="T:System.ICloneable" /> interface.</para>
<para>For more information, see <see cref="M:System.ICloneable.Clone" />.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Creates a new object that is a copy of the current instance.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A new object that is a copy of this instance.</para>
</returns>
</Docs>
</Member>
<Member MemberName="TerminateBatching">
<MemberSignature Language="C#" Value="protected virtual void TerminateBatching ();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>In <see cref="T:System.Data.Common.DbDataAdapter" />, this method throws <see cref="T:System.NotSupportedException" />. Classes that inherit from <see cref="T:System.Data.Common.DbDataAdapter" /> override this method to provide support for batches.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Ends batching for the <see cref="T:System.Data.Common.DbDataAdapter" />.</para>
</summary>
</Docs>
</Member>
<Member MemberName="Update">
<MemberSignature Language="C#" Value="public int Update (System.Data.DataRow[] dataRows);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataRows" Type="System.Data.DataRow[]" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>When an application calls the <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> method, the <see cref="T:System.Data.Common.DbDataAdapter" /> examines the <see cref="P:System.Data.DataRow.RowState" /> property, and executes the required INSERT, UPDATE, or DELETE statements iteratively for each row, based on the order of the indexes configured in the <see cref="T:System.Data.DataSet" />. For example, <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> might execute a DELETE statement, followed by an INSERT statement, and then another DELETE statement, due to the ordering of the rows in the <see cref="T:System.Data.DataTable" />.</para>
<para>It should be noted that these statements are not performed as a batch process; each row is updated individually. An application can call the <see cref="M:System.Data.DataSet.GetChanges" /> method in situations where you must control the sequence of statement types (for example, INSERTs before UPDATEs). For more information, see <format type="text/html"><a href="d1bd9a8c-0e29-40e3-bda8-d89176b72fb1">Updating the Database with a DataAdapter and the DataSet</a></format>.</para>
<para>If INSERT, UPDATE, or DELETE statements have not been specified, the <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> method generates an exception. However, you can create a <see cref="T:System.Data.SqlClient.SqlCommandBuilder" /> or <see cref="T:System.Data.OleDb.OleDbCommandBuilder" /> object to automatically generate SQL statements for single-table updates if you set the SelectCommand property of a .NET Framework data provider. Then, any additional SQL statements that you do not set are generated by the CommandBuilder. This generation logic requires key column information to be present in the <see cref="T:System.Data.DataSet" />. For more information see <format type="text/html"><a href="6e3fb8b5-373b-4f9e-ab03-a22693df8e91">Automatically Generated Commands</a></format>.</para>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> method retrieves rows from the table listed in the first mapping before performing an update. The <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> then refreshes the row using the value of the <see cref="P:System.Data.IDbCommand.UpdatedRowSource" /> property. Any additional rows returned are ignored.</para>
<para>After any data is loaded back into the <see cref="T:System.Data.DataSet" />, the <see cref="M:System.Data.Common.DbDataAdapter.OnRowUpdated(System.Data.Common.RowUpdatedEventArgs)" /> event is raised, allowing the user to inspect the reconciled <see cref="T:System.Data.DataSet" /> row and any output parameters returned by the command. After a row updates successfully, the changes to that row are accepted.</para>
<para>When using <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" />, the order of execution is as follows: </para>
<list type="ordered">
<item>
<para>The values in the <see cref="T:System.Data.DataRow" /> are moved to the parameter values.</para>
</item>
<item>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.OnRowUpdating(System.Data.Common.RowUpdatingEventArgs)" /> event is raised.</para>
</item>
<item>
<para>The command executes.</para>
</item>
<item>
<para>If the command is set to FirstReturnedRecord, the first returned result is placed in the <see cref="T:System.Data.DataRow" />.</para>
</item>
<item>
<para>If there are output parameters, they are placed in the <see cref="T:System.Data.DataRow" />.</para>
</item>
<item>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.OnRowUpdated(System.Data.Common.RowUpdatedEventArgs)" /> event is raised.</para>
</item>
<item>
<para>
<see cref="M:System.Data.DataRow.AcceptChanges" /> is called.</para>
</item>
</list>
<para>Each command associated with the <see cref="T:System.Data.Common.DbDataAdapter" /> usually has a parameters collection associated with it. Parameters are mapped to the current row through the SourceColumn and SourceVersion properties of a .NET Framework data provider's Parameter class. SourceColumn refers to a <see cref="T:System.Data.DataTable" /> column that the <see cref="T:System.Data.Common.DbDataAdapter" /> references to obtain parameter values for the current row.</para>
<para>SourceColumn refers to the unmapped column name before any table mappings have been applied. If SourceColumn refers to a nonexistent column, the action taken depends on one of the following <see cref="T:System.Data.MissingMappingAction" /> values.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Enumeration value </para>
</term>
<description>
<para>Action taken </para>
</description>
</item>
</listheader>
<item>
<term>
<para>MissingMappingAction.Passthrough </para>
</term>
<description>
<para>Use the source column names and table names in the <see cref="T:System.Data.DataSet" /> if no mapping is present. </para>
</description>
</item>
<item>
<term>
<para>MissingMappingAction.Ignore </para>
</term>
<description>
<para>A <see cref="T:System.SystemException" /> is generated. When the mappings are explicitly set, a missing mapping for an input parameter is usually the result of an error. </para>
</description>
</item>
<item>
<term>
<para>MissingMappingAction.Error </para>
</term>
<description>
<para>A <see cref="T:System.SystemException" /> is generated. </para>
</description>
</item>
</list>
<para>The SourceColumn property is also used to map the value for output or input/output parameters back to the DataSet. An exception is generated if it refers to a nonexistent column.</para>
<para>The SourceVersion property of a .NET Framework data provider's Parameter class determines whether to use the Original, Current, or Proposed version of the column value. This capability is often used to include original values in the WHERE clause of an UPDATE statement to check for optimistic concurrency violations.</para>
<block subset="none" type="note">
<para>If an error occurs while updating a row, an exception is thrown and execution of the update is discontinued. To continue the update operation without generating exceptions when an error is encountered, set the <see cref="P:System.Data.Common.DataAdapter.ContinueUpdateOnError" /> property to true before calling <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" />. You may also respond to errors on a per-row basis within the RowUpdated event of a DataAdapter. To continue the update operation without generating an exception within the RowUpdated event, set the <see cref="P:System.Data.Common.RowUpdatedEventArgs.Status" /> property of the <see cref="T:System.Data.Common.RowUpdatedEventArgs" /> to <see cref="F:System.Data.UpdateStatus.Continue" />.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Updates the values in the database by executing the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the specified array in the <see cref="T:System.Data.DataSet" />.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The number of rows successfully updated from the <see cref="T:System.Data.DataSet" />.</para>
</returns>
<param name="dataRows">
<attribution license="cc4" from="Microsoft" modified="false" />An array of <see cref="T:System.Data.DataRow" /> objects used to update the data source. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Update">
<MemberSignature Language="C#" Value="public override int Update (System.Data.DataSet dataSet);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataSet" Type="System.Data.DataSet" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>When an application calls the <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> method, the <see cref="T:System.Data.Common.DbDataAdapter" /> examines the <see cref="P:System.Data.DataRow.RowState" /> property, and executes the required INSERT, UPDATE, or DELETE statements iteratively for each row, based on the order of the indexes configured in the <see cref="T:System.Data.DataSet" />. For example, <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> might execute a DELETE statement, followed by an INSERT statement, and then another DELETE statement, due to the ordering of the rows in the <see cref="T:System.Data.DataTable" />.</para>
<para>It should be noted that these statements are not performed as a batch process; each row is updated individually. An application can call the <see cref="M:System.Data.DataSet.GetChanges" /> method in situations where you must control the sequence of statement types (for example, INSERTs before UPDATEs). For more information, see <format type="text/html"><a href="D1BD9A8C-0E29-40E3-BDA8-D89176B72FB1">Updating the Database With a DataAdapter and a DataSet</a></format>.</para>
<para>If INSERT, UPDATE, or DELETE statements have not been specified, the <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> method generates an exception. However, you can create a <see cref="T:System.Data.SqlClient.SqlCommandBuilder" /> or <see cref="T:System.Data.OleDb.OleDbCommandBuilder" /> object to automatically generate SQL statements for single-table updates if you set the SelectCommand property of a .NET Framework data provider. Then, any additional SQL statements that you do not set are generated by the CommandBuilder. This generation logic requires key column information to be present in the <see cref="T:System.Data.DataSet" />. For more information see <format type="text/html"><a href="6e3fb8b5-373b-4f9e-ab03-a22693df8e91">Automatically Generated Commands</a></format>.</para>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> method retrieves rows from the table listed in the first mapping before performing an update. The <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> then refreshes the row using the value of the <see cref="P:System.Data.IDbCommand.UpdatedRowSource" /> property. Any additional rows returned are ignored.</para>
<para>After any data is loaded back into the <see cref="T:System.Data.DataSet" />, the <see cref="M:System.Data.Common.DbDataAdapter.OnRowUpdated(System.Data.Common.RowUpdatedEventArgs)" /> event is raised, allowing the user to inspect the reconciled <see cref="T:System.Data.DataSet" /> row and any output parameters returned by the command. After a row updates successfully, the changes to that row are accepted.</para>
<para>When using <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" />, the order of execution is as follows: </para>
<list type="ordered">
<item>
<para>The values in the <see cref="T:System.Data.DataRow" /> are moved to the parameter values.</para>
</item>
<item>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.OnRowUpdating(System.Data.Common.RowUpdatingEventArgs)" /> event is raised.</para>
</item>
<item>
<para>The command executes.</para>
</item>
<item>
<para>If the command is set to FirstReturnedRecord, then the first returned result is placed in the <see cref="T:System.Data.DataRow" />.</para>
</item>
<item>
<para>If there are output parameters, they are placed in the <see cref="T:System.Data.DataRow" />.</para>
</item>
<item>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.OnRowUpdated(System.Data.Common.RowUpdatedEventArgs)" /> event is raised.</para>
</item>
<item>
<para>
<see cref="M:System.Data.DataRow.AcceptChanges" /> is called.</para>
</item>
</list>
<para>Each command associated with the <see cref="T:System.Data.Common.DbDataAdapter" /> usually has a parameters collection associated with it. Parameters are mapped to the current row through the SourceColumn and SourceVersion properties of a .NET Framework data provider's Parameter class. SourceColumn refers to a <see cref="T:System.Data.DataTable" /> column that the <see cref="T:System.Data.Common.DbDataAdapter" /> references to obtain parameter values for the current row.</para>
<para>SourceColumn refers to the unmapped column name before any table mappings have been applied. If SourceColumn refers to a nonexistent column, the action taken depends on one of the following <see cref="T:System.Data.MissingMappingAction" /> values.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Enumeration value </para>
</term>
<description>
<para>Action taken </para>
</description>
</item>
</listheader>
<item>
<term>
<para>MissingMappingAction.Passthrough </para>
</term>
<description>
<para>Use the source column names and table names in the <see cref="T:System.Data.DataSet" /> if no mapping is present. </para>
</description>
</item>
<item>
<term>
<para>MissingMappingAction.Ignore </para>
</term>
<description>
<para>A <see cref="T:System.SystemException" /> is generated. When the mappings are explicitly set, a missing mapping for an input parameter is usually the result of an error. </para>
</description>
</item>
<item>
<term>
<para>MissingMappingAction.Error </para>
</term>
<description>
<para>A <see cref="T:System.SystemException" /> is generated. </para>
</description>
</item>
</list>
<para>The SourceColumn property is also used to map the value for output or input/output parameters back to the DataSet. An exception is generated if it refers to a nonexistent column.</para>
<para>The SourceVersion property of a .NET Framework data provider's Parameter class determines whether to use the Original, Current, or Proposed version of the column value. This capability is often used to include original values in the WHERE clause of an UPDATE statement to check for optimistic concurrency violations.</para>
<block subset="none" type="note">
<para>If an error occurs while updating a row, an exception is thrown and execution of the update is discontinued. To continue the update operation without generating exceptions when an error is encountered, set the <see cref="P:System.Data.Common.DataAdapter.ContinueUpdateOnError" /> property to true before calling <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" />. You may also respond to errors on a per-row basis within the RowUpdated event of a DataAdapter. To continue the update operation without generating an exception within the RowUpdated event, set the <see cref="P:System.Data.Common.RowUpdatedEventArgs.Status" /> property of the <see cref="T:System.Data.Common.RowUpdatedEventArgs" /> to <see cref="F:System.Data.UpdateStatus.Continue" />.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Updates the values in the database by executing the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the specified <see cref="T:System.Data.DataSet" />.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The number of rows successfully updated from the <see cref="T:System.Data.DataSet" />.</para>
</returns>
<param name="dataSet">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Data.DataSet" /> used to update the data source. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Update">
<MemberSignature Language="C#" Value="public int Update (System.Data.DataTable dataTable);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataTable" Type="System.Data.DataTable" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>When an application calls the <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> method, the <see cref="T:System.Data.Common.DbDataAdapter" /> examines the <see cref="P:System.Data.DataRow.RowState" /> property, and executes the required INSERT, UPDATE, or DELETE statements iteratively for each row, based on the order of the indexes configured in the <see cref="T:System.Data.DataSet" />. For example, <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> might execute a DELETE statement, followed by an INSERT statement, and then another DELETE statement, due to the ordering of the rows in the <see cref="T:System.Data.DataTable" />.</para>
<para>It should be noted that these statements are not performed as a batch process; each row is updated individually. An application can call the <see cref="M:System.Data.DataSet.GetChanges" /> method in situations where you must control the sequence of statement types (for example, INSERTs before UPDATEs). For more information, see <format type="text/html"><a href="D1BD9A8C-0E29-40E3-BDA8-D89176B72FB1">Updating the Database With a DataAdapter and a DataSet</a></format>.</para>
<para>If INSERT, UPDATE, or DELETE statements have not been specified, the <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> method generates an exception. However, you can create a <see cref="T:System.Data.SqlClient.SqlCommandBuilder" /> or <see cref="T:System.Data.OleDb.OleDbCommandBuilder" /> object to automatically generate SQL statements for single-table updates if you set the SelectCommand property of a .NET Framework data provider. Then, any additional SQL statements that you do not set are generated by the CommandBuilder. This generation logic requires key column information to be present in the <see cref="T:System.Data.DataSet" />. For more information see <format type="text/html"><a href="6e3fb8b5-373b-4f9e-ab03-a22693df8e91">Automatically Generated Commands</a></format>.</para>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> method retrieves rows from the table listed in the first mapping before performing an update. The <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> then refreshes the row using the value of the <see cref="P:System.Data.IDbCommand.UpdatedRowSource" /> property. Any additional rows returned are ignored.</para>
<para>After any data is loaded back into the <see cref="T:System.Data.DataSet" />, the <see cref="M:System.Data.Common.DbDataAdapter.OnRowUpdated(System.Data.Common.RowUpdatedEventArgs)" /> event is raised, allowing the user to inspect the reconciled <see cref="T:System.Data.DataSet" /> row and any output parameters returned by the command. After a row updates successfully, the changes to that row are accepted.</para>
<para>When using <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" />, the order of execution is as follows: </para>
<list type="ordered">
<item>
<para>The values in the <see cref="T:System.Data.DataRow" /> are moved to the parameter values.</para>
</item>
<item>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.OnRowUpdating(System.Data.Common.RowUpdatingEventArgs)" /> event is raised.</para>
</item>
<item>
<para>The command executes.</para>
</item>
<item>
<para>If the command is set to FirstReturnedRecord, then the first returned result is placed in the <see cref="T:System.Data.DataRow" />.</para>
</item>
<item>
<para>If there are output parameters, they are placed in the <see cref="T:System.Data.DataRow" />.</para>
</item>
<item>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.OnRowUpdated(System.Data.Common.RowUpdatedEventArgs)" /> event is raised.</para>
</item>
<item>
<para>
<see cref="M:System.Data.DataRow.AcceptChanges" /> is called.</para>
</item>
</list>
<para>Each command associated with the <see cref="T:System.Data.Common.DbDataAdapter" /> usually has a parameters collection associated with it. Parameters are mapped to the current row through the SourceColumn and SourceVersion properties of a .NET Framework data provider's Parameter class. SourceColumn refers to a <see cref="T:System.Data.DataTable" /> column that the <see cref="T:System.Data.Common.DbDataAdapter" /> references to obtain parameter values for the current row.</para>
<para>SourceColumn refers to the unmapped column name before any table mappings have been applied. If SourceColumn refers to a nonexistent column, the action taken depends on one of the following <see cref="T:System.Data.MissingMappingAction" /> values.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Enumeration value </para>
</term>
<description>
<para>Action taken </para>
</description>
</item>
</listheader>
<item>
<term>
<para>MissingMappingAction.Passthrough </para>
</term>
<description>
<para>Use the source column names and table names in the <see cref="T:System.Data.DataSet" /> if no mapping is present. </para>
</description>
</item>
<item>
<term>
<para>MissingMappingAction.Ignore </para>
</term>
<description>
<para>A <see cref="T:System.SystemException" /> is generated. When the mappings are explicitly set, a missing mapping for an input parameter is usually the result of an error. </para>
</description>
</item>
<item>
<term>
<para>MissingMappingAction.Error </para>
</term>
<description>
<para>A <see cref="T:System.SystemException" /> is generated. </para>
</description>
</item>
</list>
<para>The SourceColumn property is also used to map the value for output or input/output parameters back to the DataSet. An exception is generated if it refers to a nonexistent column.</para>
<para>The SourceVersion property of a .NET Framework data provider's Parameter class determines whether to use the Original, Current, or Proposed version of the column value. This capability is often used to include original values in the WHERE clause of an UPDATE statement to check for optimistic concurrency violations.</para>
<block subset="none" type="note">
<para>If an error occurs while updating a row, an exception is thrown and execution of the update is discontinued. To continue the update operation without generating exceptions when an error is encountered, set the <see cref="P:System.Data.Common.DataAdapter.ContinueUpdateOnError" /> property to true before calling <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" />. You may also respond to errors on a per-row basis within the RowUpdated event of a DataAdapter. To continue the update operation without generating an exception within the RowUpdated event, set the <see cref="P:System.Data.Common.RowUpdatedEventArgs.Status" /> property of the <see cref="T:System.Data.Common.RowUpdatedEventArgs" /> to <see cref="F:System.Data.UpdateStatus.Continue" />.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Updates the values in the database by executing the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the specified <see cref="T:System.Data.DataTable" />.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The number of rows successfully updated from the <see cref="T:System.Data.DataTable" />.</para>
</returns>
<param name="dataTable">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Data.DataTable" /> used to update the data source. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Update">
<MemberSignature Language="C#" Value="protected virtual int Update (System.Data.DataRow[] dataRows, System.Data.Common.DataTableMapping tableMapping);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataRows" Type="System.Data.DataRow[]" />
<Parameter Name="tableMapping" Type="System.Data.Common.DataTableMapping" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>When an application calls the <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> method, the <see cref="T:System.Data.Common.DbDataAdapter" /> examines the <see cref="P:System.Data.DataRow.RowState" /> property, and executes the required INSERT, UPDATE, or DELETE statements iteratively for each row, based on the order of the indexes configured in the <see cref="T:System.Data.DataSet" />. For example, <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> might execute a DELETE statement, followed by an INSERT statement, and then another DELETE statement, due to the ordering of the rows in the <see cref="T:System.Data.DataTable" />.</para>
<para>It should be noted that these statements are not performed as a batch process; each row is updated individually. An application can call the <see cref="M:System.Data.DataSet.GetChanges" /> method in situations where you must control the sequence of statement types (for example, INSERTs before UPDATEs). For more information, see <format type="text/html"><a href="d1bd9a8c-0e29-40e3-bda8-d89176b72fb1">Updating the Database with a DataAdapter and the DataSet</a></format>.</para>
<para>If INSERT, UPDATE, or DELETE statements have not been specified, the <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> method generates an exception. However, you can create a <see cref="T:System.Data.SqlClient.SqlCommandBuilder" /> or <see cref="T:System.Data.OleDb.OleDbCommandBuilder" /> object to automatically generate SQL statements for single-table updates if you set the SelectCommand property of a .NET Framework data provider. Then, any additional SQL statements that you do not set are generated by the CommandBuilder. This generation logic requires key column information to be present in the <see cref="T:System.Data.DataSet" />. For more information see <format type="text/html"><a href="6e3fb8b5-373b-4f9e-ab03-a22693df8e91">Automatically Generated Commands</a></format>.</para>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> method retrieves rows from the table listed in the first mapping before performing an update. The <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> then refreshes the row using the value of the <see cref="P:System.Data.IDbCommand.UpdatedRowSource" /> property. Any additional rows returned are ignored.</para>
<para>After any data is loaded back into the <see cref="T:System.Data.DataSet" />, the <see cref="M:System.Data.Common.DbDataAdapter.OnRowUpdated(System.Data.Common.RowUpdatedEventArgs)" /> event is raised, allowing the user to inspect the reconciled <see cref="T:System.Data.DataSet" /> row and any output parameters returned by the command. After a row updates successfully, the changes to that row are accepted.</para>
<para>When using <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" />, the order of execution is as follows: </para>
<list type="ordered">
<item>
<para>The values in the <see cref="T:System.Data.DataRow" /> are moved to the parameter values.</para>
</item>
<item>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.OnRowUpdating(System.Data.Common.RowUpdatingEventArgs)" /> event is raised.</para>
</item>
<item>
<para>The command executes.</para>
</item>
<item>
<para>If the command is set to FirstReturnedRecord, then the first returned result is placed in the <see cref="T:System.Data.DataRow" />.</para>
</item>
<item>
<para>If there are output parameters, they are placed in the <see cref="T:System.Data.DataRow" />.</para>
</item>
<item>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.OnRowUpdated(System.Data.Common.RowUpdatedEventArgs)" /> event is raised.</para>
</item>
<item>
<para>
<see cref="M:System.Data.DataRow.AcceptChanges" /> is called.</para>
</item>
</list>
<para>Each command associated with the <see cref="T:System.Data.Common.DbDataAdapter" /> usually has a parameters collection associated with it. Parameters are mapped to the current row through the SourceColumn and SourceVersion properties of a .NET Framework data provider's Parameter class. SourceColumn refers to a <see cref="T:System.Data.DataTable" /> column that the <see cref="T:System.Data.Common.DbDataAdapter" /> references to obtain parameter values for the current row.</para>
<para>SourceColumn refers to the unmapped column name before any table mappings have been applied. If SourceColumn refers to a nonexistent column, the action taken depends on one of the following <see cref="T:System.Data.MissingMappingAction" /> values.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Enumeration value </para>
</term>
<description>
<para>Action taken </para>
</description>
</item>
</listheader>
<item>
<term>
<para>MissingMappingAction.Passthrough </para>
</term>
<description>
<para>Use the source column names and table names in the <see cref="T:System.Data.DataSet" /> if no mapping is present. </para>
</description>
</item>
<item>
<term>
<para>MissingMappingAction.Ignore </para>
</term>
<description>
<para>A <see cref="T:System.SystemException" /> is generated. When the mappings are explicitly set, a missing mapping for an input parameter is usually the result of an error. </para>
</description>
</item>
<item>
<term>
<para>MissingMappingAction.Error </para>
</term>
<description>
<para>A <see cref="T:System.SystemException" /> is generated. </para>
</description>
</item>
</list>
<para>The SourceColumn property is also used to map the value for output or input/output parameters back to the DataSet. An exception is generated if it refers to a nonexistent column.</para>
<para>The SourceVersion property of a .NET Framework data provider's Parameter class determines whether to use the Original, Current, or Proposed version of the column value. This capability is often used to include original values in the WHERE clause of an UPDATE statement to check for optimistic concurrency violations.</para>
<block subset="none" type="note">
<para>If an error occurs while updating a row, an exception is thrown and execution of the update is discontinued. To continue the update operation without generating exceptions when an error is encountered, set the <see cref="P:System.Data.Common.DataAdapter.ContinueUpdateOnError" /> property to true before calling <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" />. You may also respond to errors on a per-row basis within the RowUpdated event of a DataAdapter. To continue the update operation without generating an exception within the RowUpdated event, set the <see cref="P:System.Data.Common.RowUpdatedEventArgs.Status" /> property of the <see cref="T:System.Data.Common.RowUpdatedEventArgs" /> to <see cref="F:System.Data.UpdateStatus.Continue" />.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Updates the values in the database by executing the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the specified array of <see cref="T:System.Data.DataSet" /> objects.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The number of rows successfully updated from the <see cref="T:System.Data.DataSet" />.</para>
</returns>
<param name="dataRows">
<attribution license="cc4" from="Microsoft" modified="false" />An array of <see cref="T:System.Data.DataRow" /> objects used to update the data source. </param>
<param name="tableMapping">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="P:System.Data.IDataAdapter.TableMappings" /> collection to use. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Update">
<MemberSignature Language="C#" Value="public int Update (System.Data.DataSet dataSet, string srcTable);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataSet" Type="System.Data.DataSet" />
<Parameter Name="srcTable" Type="System.String" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>When an application calls the <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> method, the <see cref="T:System.Data.Common.DbDataAdapter" /> examines the <see cref="P:System.Data.DataRow.RowState" /> property, and executes the required INSERT, UPDATE, or DELETE statements iteratively for each row, based on the order of the indexes configured in the <see cref="T:System.Data.DataSet" />. For example, <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> might execute a DELETE statement, followed by an INSERT statement, and then another DELETE statement, due to the ordering of the rows in the <see cref="T:System.Data.DataTable" />.</para>
<para>It should be noted that these statements are not performed as a batch process; each row is updated individually. An application can call the <see cref="M:System.Data.DataSet.GetChanges" /> method in situations where you must control the sequence of statement types (for example, INSERT before UPDATE). For more information, see <format type="text/html"><a href="D1BD9A8C-0E29-40E3-BDA8-D89176B72FB1">Updating the Database With a DataAdapter and a DataSet</a></format>.</para>
<para>If INSERT, UPDATE, or DELETE statements have not been specified, the <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> method generates an exception. However, you can create a <see cref="T:System.Data.SqlClient.SqlCommandBuilder" /> or <see cref="T:System.Data.OleDb.OleDbCommandBuilder" /> object to automatically generate SQL statements for single-table updates if you set the SelectCommand property of a .NET Framework data provider. Then, any additional SQL statements that you do not set are generated by the CommandBuilder. This generation logic requires key column information to be present in the <see cref="T:System.Data.DataSet" />. For more information see <format type="text/html"><a href="6e3fb8b5-373b-4f9e-ab03-a22693df8e91">Automatically Generated Commands</a></format>.</para>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> method supports scenarios where the <see cref="T:System.Data.DataSet" /> contains multiple <see cref="T:System.Data.DataTable" /> objects whose names differ only by case. When multiple tables with the same name, but different case, exist in a DataSet, <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> performs a case-sensitive comparison to find the corresponding table, and generates an exception if no exact match exists. The following C# code illustrates this behavior.</para>
<code>DataSet ds = new DataSet();
ds.Tables.Add("aaa");
ds.Tables.Add("AAA");
adapter.Update(ds, "aaa"); // Updates "aaa", which already exists in the DataSet.
adapter.Update(ds, "AAA"); // Updates "AAA", which already exists in the DataSet.
adapter.Update(ds, "Aaa"); // Results in an exception.</code>
<para>If <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> is called and the <see cref="T:System.Data.DataSet" /> contains only one <see cref="T:System.Data.DataTable" /> whose name differs only by case, that <see cref="T:System.Data.DataTable" /> is updated. In this scenario, the comparison is case insensitive. The following C# code illustrates this behavior.</para>
<code>DataSet dataset = new DataSet();
dataset.Tables.Add("aaa");
adapter.Update(dataset, "AAA"); // Updates table "aaa" because only one similarly named table is in the DataSet.</code>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> method retrieves rows from the table listed in the first mapping before performing an update. The <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" /> then refreshes the row using the value of the <see cref="P:System.Data.IDbCommand.UpdatedRowSource" /> property. Any additional rows returned are ignored.</para>
<para>After any data is loaded back into the <see cref="T:System.Data.DataSet" />, the <see cref="M:System.Data.Common.DbDataAdapter.OnRowUpdated(System.Data.Common.RowUpdatedEventArgs)" /> event is raised, allowing the user to inspect the reconciled <see cref="T:System.Data.DataSet" /> row and any output parameters returned by the command. After a row updates successfully, the changes to that row are accepted.</para>
<para>When using <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" />, the order of execution is as follows: </para>
<list type="ordered">
<item>
<para>The values in the <see cref="T:System.Data.DataRow" /> are moved to the parameter values.</para>
</item>
<item>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.OnRowUpdating(System.Data.Common.RowUpdatingEventArgs)" /> event is raised.</para>
</item>
<item>
<para>The command executes.</para>
</item>
<item>
<para>If the command is set to FirstReturnedRecord, then the first returned result is placed in the <see cref="T:System.Data.DataRow" />.</para>
</item>
<item>
<para>If there are output parameters, they are placed in the <see cref="T:System.Data.DataRow" />.</para>
</item>
<item>
<para>The <see cref="M:System.Data.Common.DbDataAdapter.OnRowUpdated(System.Data.Common.RowUpdatedEventArgs)" /> event is raised.</para>
</item>
<item>
<para>
<see cref="M:System.Data.DataRow.AcceptChanges" /> is called.</para>
</item>
</list>
<para>Each command associated with the <see cref="T:System.Data.Common.DbDataAdapter" /> usually has a parameters collection associated with it. Parameters are mapped to the current row through the SourceColumn and SourceVersion properties of a .NET Framework data provider's Parameter class. SourceColumn refers to a <see cref="T:System.Data.DataTable" /> column that the <see cref="T:System.Data.Common.DbDataAdapter" /> references to obtain parameter values for the current row.</para>
<para>SourceColumn refers to the unmapped column name before any table mappings have been applied. If SourceColumn refers to a nonexistent column, the action taken depends on one of the following <see cref="T:System.Data.MissingMappingAction" /> values.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Enumeration value </para>
</term>
<description>
<para>Action taken </para>
</description>
</item>
</listheader>
<item>
<term>
<para>MissingMappingAction.Passthrough </para>
</term>
<description>
<para>Use the source column names and table names in the <see cref="T:System.Data.DataSet" /> if no mapping is present. </para>
</description>
</item>
<item>
<term>
<para>MissingMappingAction.Ignore </para>
</term>
<description>
<para>A <see cref="T:System.SystemException" /> is generated. When the mappings are explicitly set, a missing mapping for an input parameter is usually the result of an error. </para>
</description>
</item>
<item>
<term>
<para>MissingMappingAction.Error </para>
</term>
<description>
<para>A <see cref="T:System.SystemException" /> is generated. </para>
</description>
</item>
</list>
<para>The SourceColumn property is also used to map the value for output or input/output parameters back to the DataSet. An exception is generated if it refers to a nonexistent column.</para>
<para>The SourceVersion property of a .NET Framework data provider's Parameter class determines whether to use the Original, Current, or Proposed version of the column value. This capability is often used to include original values in the WHERE clause of an UPDATE statement to check for optimistic concurrency violations.</para>
<block subset="none" type="note">
<para>If an error occurs while updating a row, an exception is thrown and execution of the update is discontinued. To continue the update operation without generating exceptions when an error is encountered, set the <see cref="P:System.Data.Common.DataAdapter.ContinueUpdateOnError" /> property to true before calling <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" />. You may also respond to errors on a per-row basis within the RowUpdated event of a DataAdapter. To continue the update operation without generating an exception within the RowUpdated event, set the <see cref="P:System.Data.Common.RowUpdatedEventArgs.Status" /> property of the <see cref="T:System.Data.Common.RowUpdatedEventArgs" /> to <see cref="F:System.Data.UpdateStatus.Continue" />.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Updates the values in the database by executing the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the <see cref="T:System.Data.DataSet" /> with the specified <see cref="T:System.Data.DataTable" /> name.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The number of rows successfully updated from the <see cref="T:System.Data.DataSet" />.</para>
</returns>
<param name="dataSet">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Data.DataSet" /> to use to update the data source. </param>
<param name="srcTable">
<attribution license="cc4" from="Microsoft" modified="false" />The name of the source table to use for table mapping. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="UpdateBatchSize">
<MemberSignature Language="C#" Value="public virtual int UpdateBatchSize { set; get; }" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(1)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="P:System.Data.Common.DbDataAdapter.UpdateBatchSize" /> property to update a data source with changes from a <see cref="T:System.Data.DataSet" />. If the data provider supports batch processing, this can increase application performance by reducing the number of round-trips to the server. In ADO.NET 2.0, this property is supported for the .NET data providers for SQL Server (SqlClient) and Oracle (OracleClient). </para>
<para>Executing an extremely large batch could decrease performance. Therefore, you should test for the optimum batch size setting before implementing your application.</para>
<para>An <see cref="T:System.ArgumentOutOfRangeException" /> will be thrown if the value is set to a number less than zero.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets or sets a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch. </para>
</summary>
</Docs>
</Member>
<Member MemberName="UpdateCommand">
<MemberSignature Language="C#" Value="public System.Data.Common.DbCommand UpdateCommand { set; get; }" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Data.Common.DbCommand</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>During <see cref="M:System.Data.Common.DbDataAdapter.Update(System.Data.DataSet)" />, if this property is not set and primary key information is present in the <see cref="T:System.Data.DataSet" />, the <see cref="P:System.Data.IDbDataAdapter.UpdateCommand" /> will be automatically generated.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets or sets a command used to update records in the data source.</para>
</summary>
</Docs>
</Member>
</Members>
</Type>
|