I use data connections to connect to a SQL Server 2008 Database. I search the web to know how to open, close and do queries (CRUD) but I found nothing.
In a first time, I would open a connection. I am stuck because I don't know how to get my connection "object" and use it in C# code.
Here is the begining of my code :
SqlConnection conn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["Connection"].ConnectionString);
Thanks in advance !
You can't use the database from the Server Manager. Instead include the database in your Solution Explorer. However you will still need the database to be in the Server Manager in order to use it in your Solution Explorer. You can add it to your Solution Explorer by right clicking on Solution Explorer and go to add -> new item.