1

I have been searching through SO and found a connection string that seems to be what I need.

However, it does not work.

I use SQL Server 2012 Express and I need my application to connect (with no credentials). I am using the following con.string:

Server=(localdb)\\SQLEXPRESS;Database=MyDB;Trusted_Connection=Yes;

However, the server does not respond.

1

1 Answer 1

1

You need to either use the proper SQL Server Express - then use this connection string:

server=(local)\\SQLEXPRESS;Database=MyDB;Integrated Security=SSPI;

(use just (local) - not (localdb))

or you use LocalDB (which is a "run-on-demand" version of SQL Server Express), in that case, use:

server=(localdb)\\v11.0;Database=MyDB;Integrated Security=SSPI;

The difference:

  • SQL Server Express proper is a server-based solution, which is installed and runs as a Windows service all the time

  • SQL Server Express LocalDB is a run-on-demand version of SQL Server Express, which only gets started up when you need it (e.g. in debugging inside Visual Studio 2012/2013)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.