Technical Noob
Technical Noob

Reputation: 53

LocalDB: A newtwork-related or instance-specific error occured

I'm currently doing a project for a client. And for the database I'm using localDB and for deployment I'm using ClickOnce. My database name is Database.mdf and the connection string is

Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True

When I launch this application, it works fine on my computer. However when I install it on another computer I get the 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.)

I have looked for answers in other forums as well however nothing seems to work. Can anyone tell me what the problem is?

Edit: I have included LocalDB and .Net Framework 4.6.1 as prerequisite.

Edit 2: The above problem was fixed but I have a new error now! It says that it cannot create the database because it is version 852 and this server supports version 706 and earlier!

Error Image

Upvotes: 0

Views: 950

Answers (1)

user11195556
user11195556

Reputation:

Check whether you able to connect with this localDB string in the SQL Management Studio. If you unable to connect with this. then this connection string is not valid

check your connection string here: Unable to connect to localDB in VS2012 – "A network-related or instance-specific error occurred while establishing a connection to SQL Server..."

Upvotes: 1

Related Questions