Win 11 vers: 10.0.22621
VS 2022 vers: 17.7.4
Net. 4.8.0902
SQL Server vers: 15.0.2101.7
Both VS and SQL are on the same pc.
I'm an old vb programmer and a cannot figure out how to connect to SQL Server via: 'Dim cn as New SqlConnection' The intellisense does not list the connection object. Can you please point me to some instructions on how to resolve this? Thank you for your time.
Poked around the internet but could not find any solutions.
If you start a new .NET Framework 4.8 Console App, the following code should work. Replace
MyDatabaseNamewith the name of your database andMyTableNamewith the name of your table.