A network-related or instance-specific error occurred

kbutchm

Member
Joined
May 12, 2011
Messages
10
Programming Experience
1-3
Hi,

I'm deploying a database application onto another pc (client pc), not the one it was developed on(local machine).
The db application is designed in vb.net and with SQL express (.mdf file)
The application works fine on the local machine but when deployed on the client pc I get 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 ... Error 26 - Error Locating Server/Instance Specified.

My question is - does the client pc need SQL Express installed on it for an application with a .mdf file to run?
Or is there something else I need to do to get the application running?

My connectionstring is: Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\App_Data\Database.mdf;Integrated Security=True;User Instance=True"

Thanks for you help
 
You are correct this is because the connection you are attempting to open cannot find the data source, which in this case is looking for a local instance of sql express.
 
Back
Top