I have made a simple DataBase Application . I'm using Microsoft SQL SERVER MANAGEMENT STUDIO 2012. I imported my database.mdf file to VS by going to DataSource and I marked always copy.
I'm using connection String given below:
string Connection = "Data Source=(localdb)\\v11.0;AttachDbFilename=|DataDirectory|\\School.mdf;Integrated Security=True";Then, after completing my work, I published it and was able to install it in another PC correctly. But, I get the following error after running it:
Error: System.Data.SqlClient.SqlException . A network-related or instance specific error occurred while establishing a connection to SQL SERVER. The server was not found or was not accessible...

Asad VegitoPosted Jul 23, 2014, 7:11 PM
Error: System.Data.SqlClient.SqlException . A network-related or instance specific error occurred while establishing a connection to SQL SERVER. The server was not found or was not accessible...
Please note that i`m running my application to another machine ... On my machine it is working good but on other machines it is not working . Above mention error is comming again and again .
Ihave also search on other Forums they said that client computer must have SSMS installed in it other wise your application will not run . But is there any other way to run my application without installing SSMS to client machines.
Thanks!
Asad VegitoPosted Jul 23, 2014, 3:56 PM
Ravi KumarPosted Jul 23, 2014, 12:53 AM
check lan is working or not.
Ramesh MaruthiPosted Jul 22, 2014, 4:30 PM
Try to mention the initial catalog as some database name your working if not it refers to the server