Feb 04, 2013 02:53 PM|Nenson|LINK
I have read most of the threads with this problem, and was searching for a solution everywhere but nothing helped, please just post a solution that I could try to implement. The connection string that i used in Visual Studio 2010 also does not work.
So, I am using Visual Studio Express 2012, the web.confing string is the following (the latest that I have tryed to use):
<add name="myConnectionString" connectionString="Data Source=|DataDirectory|\Database.mdf;Initial Catalog=MyDataBaseName;Integrated Security=True"
string sqlQuery = "SELECT ime FROM Korisnik";
string connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString;
SqlConnection sqlcon = new SqlConnection(connectionString);
And finally, the latest error that was thrown:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider:
SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
It's very frustrating, thank you people!