You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/snippets/Microsoft.Data.SqlClient/SqlConnection.xml
+68-1Lines changed: 68 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1371,12 +1371,28 @@ For more information on working with events, see [Connection Events](https://lea
1371
1371
</FireInfoMessageEventOnUserErrors>
1372
1372
<GetSchema2>
1373
1373
<summary>
1374
-
Returns schema information for the data source of this <seecref="T:Microsoft.Data.SqlClient.SqlConnection" />. For more information about scheme, see <seehref="https://learn.microsoft.com/sql/connect/ado-net/sql-server-schema-collections">SQL Server Schema Collections</see>.
1374
+
Returns schema information for the data source of this <seecref="T:Microsoft.Data.SqlClient.SqlConnection" />. For more information about schemas, see <seehref="https://learn.microsoft.com/sql/connect/ado-net/sql-server-schema-collections">SQL Server Schema Collections</see>.
1375
1375
</summary>
1376
1376
<returns>
1377
1377
A <seecref="T:System.Data.DataTable" /> that contains schema information.
1378
1378
</returns>
1379
1379
</GetSchema2>
1380
+
<GetSchemaAsync>
1381
+
<paramname="cancellationToken">
1382
+
The cancellation token.
1383
+
</param>
1384
+
<summary>
1385
+
An asynchronous version of <seecref="M:Microsoft.Data.SqlClient.SqlConnection.GetSchema()" />, which returns schema information for the data source of this <seecref="T:Microsoft.Data.SqlClient.SqlConnection" />. For more information about schemas, see <seehref="https://learn.microsoft.com/sql/connect/ado-net/sql-server-schema-collections">SQL Server Schema Collections</see>.
1386
+
</summary>
1387
+
<returns>
1388
+
A task representing the asynchronous operation.
1389
+
</returns>
1390
+
<remarks>
1391
+
<para>
1392
+
For more information about asynchronous programming in the .NET Framework Data Provider for SQL Server, see <seehref="https://learn.microsoft.com/sql/connect/ado-net/asynchronous-programming">Asynchronous Programming</see>.
1393
+
</para>
1394
+
</remarks>
1395
+
</GetSchemaAsync>
1380
1396
<GetSchemaCollectionName>
1381
1397
<paramname="collectionName">
1382
1398
Specifies the name of the schema to return.
@@ -1662,6 +1678,28 @@ For more information on working with events, see [Connection Events](https://lea
1662
1678
<paramrefname="collectionName" /> is specified as null.
1663
1679
</exception>
1664
1680
</GetSchemaCollectionName>
1681
+
<GetSchemaCollectionNameAsync>
1682
+
<paramname="collectionName">
1683
+
Specifies the name of the schema to return.
1684
+
</param>
1685
+
<paramname="cancellationToken">
1686
+
The cancellation token.
1687
+
</param>
1688
+
<summary>
1689
+
An asynchronous version of <seecref="M:Microsoft.Data.SqlClient.SqlConnection.GetSchema(string)" />, which returns schema information for the data source of this <seecref="T:Microsoft.Data.SqlClient.SqlConnection" /> using the specified string for the schema name.
1690
+
</summary>
1691
+
<returns>
1692
+
A task representing the asynchronous operation.
1693
+
</returns>
1694
+
<remarks>
1695
+
<para>
1696
+
For more information about asynchronous programming in the .NET Framework Data Provider for SQL Server, see <seehref="https://learn.microsoft.com/sql/connect/ado-net/asynchronous-programming">Asynchronous Programming</see>.
1697
+
</para>
1698
+
</remarks>
1699
+
<exceptioncref="T:System.ArgumentException">
1700
+
<paramrefname="collectionName" /> is specified as null.
1701
+
</exception>
1702
+
</GetSchemaCollectionNameAsync>
1665
1703
<GetSchemaCollectionNameRestrictionValues>
1666
1704
<paramname="collectionName">
1667
1705
Specifies the name of the schema to return.
@@ -1691,6 +1729,35 @@ For more information on working with events, see [Connection Events](https://lea
A set of restriction values for the requested schema.
1738
+
</param>
1739
+
<paramname="cancellationToken">
1740
+
The cancellation token.
1741
+
</param>
1742
+
<summary>
1743
+
An asynchronous version of <seecref="M:Microsoft.Data.SqlClient.SqlConnection.GetSchema(string, string[])" />, which returns schema information for the data source of this <seecref="T:Microsoft.Data.SqlClient.SqlConnection" /> using the specified string for the schema name and the specified string array for the restriction values.
1744
+
</summary>
1745
+
<returns>
1746
+
A task representing the asynchronous operation.
1747
+
</returns>
1748
+
<remarks>
1749
+
<para>
1750
+
The <paramrefname="restrictionValues" /> parameter can supply <i>n</i> depth of values, which are specified by the restrictions collection for a specific collection. In order to set values on a given restriction, and not set the values of other restrictions, you need to set the preceding restrictions to <seelangword="null" /> and then put the appropriate value in for the restriction that you would like to specify a value for.
1751
+
</para>
1752
+
<para>
1753
+
An example of this is the "Tables" collection. If the "Tables" collection has three restrictions--database, owner, and table name--and you want to get back only the tables associated with the owner "Carl", you need to pass in the following values: null, "Carl". If a restriction value is not passed in, the default values are used for that restriction. This is the same mapping as passing in <seelangword="null" />, which is different from passing in an empty string for the parameter value. In that case, the empty string ("") is considered to be the value for the specified parameter.
1754
+
</para>
1755
+
</remarks>
1756
+
<exceptioncref="T:System.ArgumentException">
1757
+
<paramrefname="collectionName" /> is specified as null.
0 commit comments