Edward Aymami

Edward Aymami

  • 1.7k
  • 21
  • 2.9k

Connect to SQL Server with C#

Nov 3 2023 6:18 PM

I am trying to create a Data Layer for a C# Application in Visual Studio19. I am trying to connect to SQL Server 15.0.2010...  I am using .Net 5.0 to and the following Usings:

The project will open the databases just fine. When I try to write the code, I get a multitude of errors not recognizing the SQL Command Object or the connection string.

using OnTarget2019.DataClasses;
using System;
using System.Data;
using System.Data.Common;

I would sincerely appreciate any help you can give me on how to do this properly.

 

ED Aymami


Answers (5)