SqlConnection and SqlDataAdapter not found in vb.net 6.0

Anthony White 21 Reputation points

I am trying to write a simple application to access an SQL database, but cannot reference SqlConnection or SqlDataServer. I've added

to the project.

Once again, this is using vb.net 6.0

Microsoft Technologies based on the .NET software framework.
3,545 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,117 questions
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,636 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 59,546 Reputation points

    net 6 no longer includes System.Data.SqlClient as Microsoft.Data.SqlClient is the recommend replacement. you must use a nuget package to induce the old or new package.

  2. Anthony White 21 Reputation points

    Thanks for the help.

    I think I am going to just switch to C# for my .NET endeavors.

    I am an old C++ hack. The C# examples work (I've been having a LOT of problems getting the VB examples to work with .NET 6 for what should be simple stuff), and C# just make more sense to me in terms of styling.

    This may be going off topic for this question, but anyone feel free to tell me that I am wrong, and stick with VB...