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.
SqlConnection and SqlDataAdapter not found in vb.net 6.0

I am trying to write a simple application to access an SQL database, but cannot reference SqlConnection or SqlDataServer. I've added
System.Data
System.Data.SqlClient
System.Data.OleDb
to the project.
Once again, this is using vb.net 6.0
2 answers
Sort by: Most helpful
-
-
Anthony White 21 Reputation points
2022-11-04T22:04:11.137+00:00 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...