【问题标题】:the underlying provider failed on open not supported on new pc底层提供程序在打开时失败,新电脑不支持
【发布时间】:2014-01-05 13:18:53
【问题描述】:

我有一个带有语言环境数据库的应用程序。在我的开发电脑上一切正常,但是当我尝试在新电脑上运行我的应用程序时出现异常并且此消息“底层提供程序在打开时失败不支持”

我将 EntityModel 与这个 connectionString 一起使用:

<connectionStrings>
<add name="KinesotherapyEntities" connectionString="metadata=res://*/Database.Kinesotherapy.csdl|res://*/Database.Kinesotherapy.ssdl|res://*/Database.Kinesotherapy.msl;provider=System.Data.SqlServerCe.3.5;provider connection string=&quot;Data Source=|DataDirectory|\Database\kinesotherapy.sdf&quot;" providerName="System.Data.EntityClient" />

【问题讨论】:

  • 你在那台电脑上也安装了数据库吗?
  • Wich connectionString?
  • 我没有在另一台电脑上安装sql server

标签: c# sql-server-ce dataprovider


【解决方案1】:

您需要在您的应用程序中包含 Compact-Sql DLL。

在解决方案资源管理器中选择 Compact-Sql 引用,然后将 CopyLocal 属性设置为 true。

http://erikej.blogspot.co.il/2011/02/using-sql-server-compact-40-with.html

【讨论】:

    猜你喜欢
    • 2011-01-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多