Busy Developer’s Guide to LocalDB in VS 2012
A LocalDB can consume standard MDF files, as LocalDB is just a server-less version of SQL Server.
It is serverless because it runs as a child process of the development environment.
The connection string for a LocalDB is
<add name="DefaultConnection"
providerName="System.Data.SqlClient"
connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename='Full\Path\To.MDF';Integrated Security=True"/>
Note that the provider is SqlClient, since we are still dealing with an SQL Server.
When you deploy, you should use a proper SQL Connection string. Do not use LocalDB.
connectionString="Server=.\SQLEXPRESS; Initial Catalog=PhluffyPhotos; User Id=testuser;Password=Test Password"
Source: Susan at BlueBlips
About this entry
You’re currently reading “ Busy Developer’s Guide to LocalDB in VS 2012 ,” an entry on Chui's Counterpoint
- Published:
- 9.12.12 / 9am
- Category:
- .Net, SQL Server
Comments are closed
Comments are currently closed on this entry.