Skip to content

Commit

Permalink
Merge master to AKV branch
Browse files Browse the repository at this point in the history
  • Loading branch information
cheenamalhotra committed Oct 16, 2019
2 parents 90c1adb + 8c3b62a commit cfa4c5d
Show file tree
Hide file tree
Showing 53 changed files with 3,475 additions and 329 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

# Microsoft SqlClient Data Provider for SQL Server

Welcome to the home of Microsoft ADO.NET driver for SQL Server aka the Microsoft.Data.SqlClient GitHub repository.
Welcome to the home of the Microsoft ADO.NET driver for SQL Server aka the Microsoft.Data.SqlClient GitHub repository.

Microsoft.Data.SqlClient is a data provider for Microsoft Sql Server. Now in General Availability, it is a union of the two System.Data.SqlClient components which live independently in .NET Framework and .NET Core. Going forward, support for new SQL Server features will be implemented in Microsoft.Data.SqlClient.
Microsoft.Data.SqlClient is a data provider for Microsoft SQL Server and Azure SQL Database. Now in General Availability, it is a union of the two System.Data.SqlClient components which live independently in .NET Framework and .NET Core. Going forward, support for new SQL Server features will be implemented in Microsoft.Data.SqlClient.

## Supportability

Expand Down
File renamed without changes.
17 changes: 17 additions & 0 deletions doc/samples/SqlCommand_ExecuteXmlReader.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// <Snippet1>
using System;
using System.Data;
using Microsoft.Data.SqlClient;

private static void CreateXMLReader(string queryString,
string connectionString)
{
using (SqlConnection connection = new SqlConnection(
connectionString))
{
connection.Open();
SqlCommand command = new SqlCommand(queryString, connection);
System.Xml.XmlReader reader = command.ExecuteXmlReader();
}
}
// </Snippet1>
File renamed without changes.
2 changes: 1 addition & 1 deletion doc/snippets/Microsoft.Data.SqlClient.Server/Format.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This enumeration is used by <xref:Microsoft.Data.SqlClient.Server.SqlUserDefined
## Examples
The following example shows the `UserDefinedType` attribute of the Point UDT. The UDT is byte-ordered, is named "Point", has a validation method named "ValidatePoint", and uses the native serialization format.
[!code-csharp[SqlUserDefinedType Example#1](~/sqlclient/doc/samples/SqlUserDefinedType.cs#1)]
[!code-csharp[SqlUserDefinedType Example#1](~/../sqlclient/doc/samples/SqlUserDefinedType.cs#1)]
]]></format>
</remarks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
## Examples
The following example shows the implementation of the <xref:Microsoft.Data.SqlClient.Server.IBinarySerialize.Read%2A> method of a UDT, which uses a <xref:System.IO.BinaryReader> to de-serialize a previously persisted UDT. This example assumes that the UDT has two data properties: `StringValue` and `DoubleValue`.
[!code-csharp[IBinarySerialize Samples#1](~/sqlclient/doc/samples/IBinarySerialize.cs#1)]
[!code-csharp[IBinarySerialize Samples#1](~/../sqlclient/doc/samples/IBinarySerialize.cs#1)]
]]></format>
</remarks>
Expand All @@ -45,7 +45,7 @@
## Examples
The following example shows the implementation of the <xref:Microsoft.Data.SqlClient.Server.IBinarySerialize.Write%2A> method of a UDT, which uses a <xref:System.IO.BinaryWriter> to serialize the UDT in the user-defined binary format. The purpose of the null character padding is to ensure that the string value is completely separated from the double value, so that one UDT is compared to another in Transact-SQL code, string bytes are compared to string bytes and double bytes are compared to double bytes.
[!code-csharp[IBinarySerialize Samples#2](~/sqlclient/doc/samples/IBinarySerialize.cs#2)]
[!code-csharp[IBinarySerialize Samples#2](~/../sqlclient/doc/samples/IBinarySerialize.cs#2)]
]]></format>
</remarks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
## Examples
The following example shows how to create several <xref:Microsoft.Data.SqlClient.Server.SqlMetaData> objects, which describe the column metadata of a record, and creating a <xref:Microsoft.Data.SqlClient.Server.SqlDataRecord>. The column values of the <xref:Microsoft.Data.SqlClient.Server.SqlDataRecord> are set and the <xref:Microsoft.Data.SqlClient.Server.SqlDataRecord> is sent to the calling program by using the <xref:Microsoft.SqlServer.Server.SqlContext> class.
[!code-csharp[SqlDataRecord Samples#1](~/sqlclient/doc/samples/SqlDataRecord.cs#1)]
[!code-csharp[SqlDataRecord Samples#1](~/../sqlclient/doc/samples/SqlDataRecord.cs#1)]
]]></format>
</remarks>
Expand All @@ -30,7 +30,7 @@
## Examples
The following example shows how to create a new <xref:Microsoft.Data.SqlClient.Server.SqlDataRecord> object from two <xref:Microsoft.Data.SqlClient.Server.SqlMetaData> objects, which indicate the column name and data type.
[!code-csharp[SqlDataRecord Samples#2](~/sqlclient/doc/samples/SqlDataRecord.cs#2)]
[!code-csharp[SqlDataRecord Samples#2](~/../sqlclient/doc/samples/SqlDataRecord.cs#2)]
]]></format>
</remarks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## Examples
The following example shows an aggregate function that returns a list of files in the specified directory path.
[!code-csharp[SqlFunctionAttribute Sample#1](~/sqlclient/doc/samples/SqlFunctionAttribute.cs#1)]
[!code-csharp[SqlFunctionAttribute Sample#1](~/../sqlclient/doc/samples/SqlFunctionAttribute.cs#1)]
]]></format>
</remarks>
Expand Down Expand Up @@ -87,7 +87,7 @@ This attribute is used only by Microsoft Visual Studio to automatically register
Thee following example specifies that the user-defined function is referenced using the name `sp_scalarFunc`.
## Examples
[!code-csharp[SqlFunction#10](~/sqlclient/doc/samples/SqlFunction.cs#10)]
[!code-csharp[SqlFunction#10](~/../sqlclient/doc/samples/SqlFunction.cs#10)]
]]></format>
</remarks>
</Name>
Expand Down Expand Up @@ -116,7 +116,7 @@ This attribute is used only by Microsoft Visual Studio to automatically register
The following example specifies that the user-defined function is referenced using the name `sp_tableFunc`. The `TableDefinition` property has the value `letter nchar(1)`.
## Examples
[!code-csharp[SqlFunction#11](~/sqlclient/doc/samples/SqlFunction.cs#11)]
[!code-csharp[SqlFunction#11](~/../sqlclient/doc/samples/SqlFunction.cs#11)]
]]></format>
</remarks>
Expand Down
6 changes: 3 additions & 3 deletions doc/snippets/Microsoft.Data.SqlClient.Server/SqlMetaData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## Examples
The following example shows the creation of several <xref:Microsoft.Data.SqlClient.Server.SqlMetaData> objects, which describe the column metadata of a record, and the creation of a <xref:Microsoft.Data.SqlClient.Server.SqlDataRecord>. The column values of the <xref:Microsoft.Data.SqlClient.Server.SqlDataRecord> are set and the <xref:Microsoft.Data.SqlClient.Server.SqlDataRecord> is sent to the calling program using the <xref:Microsoft.SqlServer.Server.SqlContext> class.
[!code-csharp[SqlMetaData Samples#1](~/sqlclient/doc/samples/SqlMetaData.cs#1)]
[!code-csharp[SqlMetaData Samples#1](~/../sqlclient/doc/samples/SqlMetaData.cs#1)]
]]></format>
</remarks>
Expand Down Expand Up @@ -50,7 +50,7 @@ The following are the default values assigned to `dbType`, depending on the `Sql
## Examples
The following example creates a new <xref:Microsoft.Data.SqlClient.Server.SqlMetaData> object by specifying the column name and a column data type of <xref:System.Data.SqlDbType>.`Int`.
[!code-csharp[SqlMetaData Samples#3](~/sqlclient/doc/samples/SqlMetaData.cs#3)]
[!code-csharp[SqlMetaData Samples#3](~/../sqlclient/doc/samples/SqlMetaData.cs#3)]
]]></format>
</remarks>
Expand Down Expand Up @@ -90,7 +90,7 @@ The following are the default values assigned to `dbType`, depending on the `Sql
## Examples
The following example creates a new <xref:Microsoft.Data.SqlClient.Server.SqlMetaData> object by specifying the column name, a column data type of <xref:System.Data.SqlDbType>`.NVarChar`, and a maximum length of 12 characters.
[!code-csharp[SqlMetaData Samples#2](~/sqlclient/doc/samples/SqlMetaData.cs#2)]
[!code-csharp[SqlMetaData Samples#2](~/../sqlclient/doc/samples/SqlMetaData.cs#2)]
]]></format>
</remarks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ For a property, the <xref:Microsoft.Data.SqlClient.Server.SqlMethodAttribute> sh
## Examples
The following example shows a UDT method that is attributed to indicate that the method will not be invoked on null instances of the type, that the method will not change the state of the type, and that the method will not be called when `null` parameters are supplied to the method invocation.
[!code-csharp[SqlMethod Sample#1](~/sqlclient/doc/samples/SqlMethod.cs#1)]
[!code-csharp[SqlMethod Sample#1](~/../sqlclient/doc/samples/SqlMethod.cs#1)]
]]></format>
</remarks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See "CLR User-Defined Aggregates" in SQL Server 2005 Books Online for more infor
## Examples
The following example shows the <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute> attribute for a user-defined aggregate. The aggregate uses custom serialization, has a maximum size of 8000 bytes when serialized, and is invariant to nulls, duplicates, and order.
[!code-csharp[SqlUserDefinedAggregate Sample#1](~/sqlclient/doc/samples/SqlUserDefinedAggregate.cs#1)]
[!code-csharp[SqlUserDefinedAggregate Sample#1](~/../sqlclient/doc/samples/SqlUserDefinedAggregate.cs#1)]
]]></format>
</remarks>
Expand All @@ -30,7 +30,7 @@ The following example shows the <xref:Microsoft.Data.SqlClient.Server.SqlUserDef
<format type="text/markdown"><![CDATA[
## Examples
[!code-csharp[SqlUserDefinedAggregate1#6](~/sqlclient/doc/samples/SqlUserDefinedAggregate1.cs#6)]
[!code-csharp[SqlUserDefinedAggregate1#6](~/../sqlclient/doc/samples/SqlUserDefinedAggregate1.cs#6)]
]]></format>
</remarks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SQL Server creates a user-defined type that is bound to the type definition that
## Examples
The following example shows the `UserDefinedType` attribute of the Point UDT. The UDT is byte-ordered, is named "Point", has a validation method named "ValidatePoint", and uses the native serialization format.
[!code-csharp[SqlUserDefinedType Example#1](~/sqlclient/doc/samples/SqlUserDefinedType.cs#1)]
[!code-csharp[SqlUserDefinedType Example#1](~/../sqlclient/doc/samples/SqlUserDefinedType.cs#1)]
]]></format>
</remarks>
Expand All @@ -27,7 +27,7 @@ The following example shows the `UserDefinedType` attribute of the Point UDT. T
The following example specifies that the `Format` of the user-defined type is `SerializedDataWithMetadata` and the `MaxByteSize` is 8000 bytes.
## Examples
[!code-csharp[SqlUserDefinedType1#12](~/sqlclient/doc/samples/SqlUserDefinedType1.cs#12)]
[!code-csharp[SqlUserDefinedType1#12](~/../sqlclient/doc/samples/SqlUserDefinedType1.cs#12)]
]]></format>
</remarks>
Expand Down
Loading

0 comments on commit cfa4c5d

Please sign in to comment.