Asad Vegito

Asad Vegito

  • NA
  • 13
  • 3.6k

DataBase Application is not Running on other Machines.

Jul 22 2014 3:26 PM

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...


Answers (4)