1
Hello Edward,
C# is the language. you can create console, desktop, web application etc with the help of c# language.
to use ADO.NET you need to use below system namespaces.
using System.Data;
using System.Configuration;
using System.Data.SqlClient;
private void GetData()
{
string constr = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
string query = "SELECT * FROM Customers";
using (SqlConnection con = new SqlConnection(constr))
{
using (SqlDataAdapter sda = new SqlDataAdapter(query, con))
{
using (DataTable dt = new DataTable())
{
sda.Fill(dt);
// use DataAdapter to bind data to grid or you can utilize as per requirement.
}
}
}
}
Thanks
Accepted 0
Hello Edward,
Yes. it will work for VS2019.
0
Does this work for VS2019? also thank you for the quick response.