LocalDB deployment on client PC

前端 未结 1 1633
庸人自扰
庸人自扰 2020-11-22 05:43

I am very intrigued by this new version of SQL Server Express.

It\'s not clear (to me) what a setup program should do to deploy an application that use a LocalDB.

相关标签:
1条回答
  • 2020-11-22 06:25

    You don't need to install SQL Server Express to use LocalDB, as LocalDB is SQL Server Express, just easier to install.

    Once LocalDB is installed you can use AttachDbFileName property of the connection string to "open" an MDF file. Keep in mind that the same file can only be opened by a single LocalDB instance (single Windows login) at any given time, so this is not a data-sharing feature.

    Update: If your application is using .NET, make sure to install .NET 4.0.2 or newer, as mentioned here. The original .NET 4 doesn't understand LocalDB connection strings, as it shipped long before LocalDB.

    0 讨论(0)
提交回复
热议问题