Using C #, connect to a database created with SQL Server 2014 Management Studio using Visual Studio 2015.
I am interested to know which string to use to be able to connect from Visual Studio 2015 to "DatabaseProva"
Until now I am connected to the database created with Visual Studio 2015. So I used the following string
SqlConnection con = new SqlConnection (@ "Data Source = (LocalDB) \ MSSQLLocalDB; AttachDbFilename = C: \ Users \ myname \ Desktop \ CODE \ Visual Studio \ Project \ ES10 \ Database2.mdf; Integrated Security = True");
In the case of database created by SQL Server 2014 instead, the path is different. And this:
So, how do I connect to this "DatabaseProva"? Which string should I use? What should I write?
Thanks to anyone who wants to help me.