问题描述
我使用SqlLocalDb.msi软件包安装了LocalDb,并且可以使用服务器名称(LocalDb)\v11.0
使用SSMS连接到它.到目前为止,一切都很好.问题是,当我尝试通过.NET 4.5应用程序连接到它时,出现错误
I installed LocalDb using the SqlLocalDb.msi package and I can connect to it using SSMS using the server name (LocalDb)\v11.0
. So far so good. The problem is that when I try to connect to it via a .NET 4.5 application I get the error
我从连接字符串Data Source=(LocalDb)\v11.0
开始,然后添加了许多内容,但无济于事(集成安全性true/sspi,附加数据库,使用实例等)
I started with the connection string Data Source=(LocalDb)\v11.0
and then added many things to no avail (integrated security true/sspi, attaching a db, using instances, etc.)
推荐答案
我认为您遇到的问题与.您忘记了转义\
字符.
I think you hit the same issue as discussed in this post. You forgot to escape your \
character.
这篇关于如何连接到LocalDb的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!