Timur Lenk

Timur Lenk

  • NA
  • 18
  • 3.4k

C# VS sql project error

Dec 16 2015 10:32 AM
Hi,
 
I finished with my Visual Studio C# project. My software use a local database on a network location. I published my project and working fine on my PC. But just on my PC. If I run my exe file (by shortcut) from a different PC I'll receive the following error:
 
"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: 50 – Local Database Runtime error occurred. The specified LocalDB instance does not exist."
 
The connection string is:

string
connString = "Data Source=(LocalDB)\\MSSQLLocalDB;AttachDbFilename=X:\\Jobref\\Jobref.mdf;Integrated Security=True";
 
 
I searched on Google and tried few tricks already. Installed SQLLocalDB, changed my string from \\MSSQLLocalDB to \\v11.0 or \\v12.0 but won't work.
 
I worked on my project a lot and not working now (on my PC only)... That is crazy.
 
Please help me.
 
Timur
 
 
 
 
 
 
 
 

 

Answers (4)