E
E
embiid2021-04-23 15:38:05
ASP.NET
embiid, 2021-04-23 15:38:05

How to connect by connection string?

Interested in such a question, I downloaded the project from git and there is a connection_string which is registered through server=(localdb)\\MSSQLLocalDB; I have a database that is used in this project (and even tried it through migration), put it in user/xxx_name
but I get an error 52.

What are other ways to connect? SQL Server Express is installed on the computer, SSMS is not installed.
Is it possible then somehow to shove mdf into the project and specify the path through connection_string?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
lucky4, 2021-04-24
@embiid

As far as I know, you can connect via connectionstrin like this:
"Server=.\SQLEXPRESS;Database=master;Trusted_Connection=True;";
"Server=(localdb)\\mssqllocaldb;Database=master;Trusted_Connection=True"
"Server=localhost;Database=master;Trusted_Connection=True;"
If sql express is installed, then it is obvious that it will work with a type 1 connection, it is possible that it will even pass through localhost.

V
Vladimir Korotenko, 2021-04-23
@firedragon

Change to any valid string through which you can connect

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question