Microsoft.Data.SqlClient package versus System.Data.SqlClient package ?

Duchemin, Dominique 2,006 Reputation points
2023-06-26T23:14:30.15+00:00

Hello,

Is the Microsoft.Data.SqlClient package used in the .NET Data Provider for SQL Server?

Is it possible to change it to System.Data.SqlClient package ?

Thanks,

Dom

 

SQL Server Migration Assistant
SQL Server Migration Assistant
A Microsoft tool designed to automate database migration to SQL Server from Access, DB2, MySQL, Oracle, and SAP ASE.
568 questions
SQL Server Other
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Anonymous
    2023-06-27T09:12:12.6866667+00:00

    Hi @Duchemin, Dominique

    I'm not an expert on .NET.

    For an introduction to Microsoft.Data.SqlClient, here is a post that may help you.

    https://devblogs.microsoft.com/dotnet/introducing-the-new-microsoftdatasqlclient/

    Best regards,

    Percy Tang


  2. Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
    2023-06-27T21:46:12.52+00:00

    Microsoft.Data.SqlClient is the newer of the two. With System.Data.SqlClient you may miss support for newer features in SQL Server.


  3. Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
    2023-06-28T21:11:23.72+00:00

    System.Data.SqlClient comes with .NET Framwork 4.* and which comes with the OS, so it should be available.

    I should also clarify what when I said that Microsoft.Data.SqlClient is newer, that is mainly a name issue. It is the same provider under a new name.

    If your legacy application uses System.Data.SqlClient that should work fine, I think. Are you facing any problems?


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.