I
I
idize2019-12-11 15:26:57
C++ / C#
idize, 2019-12-11 15:26:57

How to solve the problem when connecting to sql server(ADO.NET)?

Connection string: Data Source=(localdb)\mssqllocaldb;Initial Catalog=SimpleLogin;Integrated Security=True;Pooling=False.
Everything works on my computer, but when I run it on another computer, I get the following error:
"An error occurred while establishing a connection to SQL Server, either with a network or with a specific instance. The server was not found or is not available. Make sure that the instance name is correct and that on SQL Server allowed remote connections.(provider: SQL Network Interfaces, error: 52 - Local Database Runtime component not found. Check that SQL Server Express is properly installed and use of Local Database Runtime component is enabled"
I understand that in order to solve the problem, I need to check if Microsoft sql server local db is installed on the system, and if not, install it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin Tsvetkov, 2019-12-11
@idize

i need to check
Yes. The other computer must have LocalDB. Documentation.
what to solve the problem
You need to create an installation package.

V
Vladimir Korotenko, 2019-12-11
@firedragon

Install
SQL Server Express
Or change the line to
Data Source=MSSQL_SERVER_NAME;Initial Catalog=SimpleLogin;Integrated Security=True;Pooling=False

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question