Released: Microsoft.Data.SqlClient 4.0 Preview 1

This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Tech Community.

Microsoft.Data.SqlClient 4.0 Preview 1 has been released. This release contains improvements and updates to the Microsoft.Data.SqlClient data provider for SQL Server.

Our plan is to provide GA releases twice a year with two preview releases in between. This cadence should provide time for feedback and allow us to deliver features and fixes in a timely manner. This first 4.0 preview includes many fixes and changes over the previous 3.0 GA release.

 

Notable changes include:

  • Encrypt default value set to true

    The default value of the Encrypt connection setting has been changed from false to true. With the growing use of cloud databases and the need to ensure those connections are secure, it's time for this backwards-compatibility-breaking change.

  • Ensure connections fail when encryption is required

    In scenarios where client encryption libraries were disabled or unavailable, it was possible for unencrypted connections to be made when Encrypt was set to true or the server required encryption.

  • App Context Switch for using System default protocols

    TLS 1.3 is not supported by the driver; therefore, it has been removed from the supported protocols list by default. Users can switch back to forcing use of Operating System's client protocols, by enabling the App Context switch below:

    Switch.Microsoft.Data.SqlClient.UseSystemDefaultSecureProtocols

  • Enable optimized parameter binding

    Microsoft.Data.SqlClient introduces new SqlCommand API, EnableOptimizedParameterBinding to improve performance of queries with large number of parameters. This property is disabled by default. When set to true, parameter names will not be sent to the SQL server when the command is executed.

    public class SqlCommand
    {
    	public bool EnableOptimizedParameterBinding { get; set; }
    }

 

For the full list of changes in Microsoft.Data.SqlClient 4.0 Preview 1, please see the Release Notes.

 

To try out the new package, add a NuGet reference to Microsoft.Data.SqlClient in your application and pick the 4.0 preview 1 version.

 

We appreciate the time and effort you spend checking out our previews. It makes the final product that much better. If you encounter any issues or have any feedback, head over to the SqlClient GitHub repository and submit an issue.

 

David Engel

REMEMBER: these articles are REPUBLISHED. Your best bet to get a reply is to follow the link at the top of the post to the ORIGINAL post! BUT you're more than welcome to start discussions here:

This site uses Akismet to reduce spam. Learn how your comment data is processed.