切换到另一个数据库(从SQL 2005到Sql CE) [英] Switch to another Database (from SQL 2005 to Sql CE)

查看:55
本文介绍了切换到另一个数据库(从SQL 2005到Sql CE)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述







我已经在SQL 2005数据库上创建了一个应用程序。我使用过Entity Framework。该应用程序工作正常!

我刚刚尝试将我的数据库从SQL 2005切换到SQL CE(两者都有相同的结构和数据)。我还修改了"app.config"文件中的连接字符串,但它不起作用。我启动应用程序时遇到异常:


错误指定的SSDL工件中的"System.Data.SqlClient"提供程序与连接字符串中预期的"System.Data.SqlServerCe.3.5"提供程序不匹配。

我还需要修改其他内容吗?

Hi,

I’ve made an application working on an SQL 2005 Database. I have used Entity Framework. The application works fine!

I’ve just tried to switch my database from SQL 2005 to SQL CE (both have same structure and data). I’ve also modified the connection string in "app.config" file but it doesn’t work. I've got an exception when I started up my application :


Error The 'System.Data.SqlClient' provider from the specified SSDL artifact(s) does not match the expected 'System.Data.SqlServerCe.3.5' provider from the connection string.

Do I need to modify anything else?

推荐答案

在将数据库更改为SQL CE后,您是否再次从数据库生成模型?如果再次生成,SSDL提供程序信息将与SqlCe匹配,您的应用程序应该可以正常工作。

Did you generate your model from database again, after changing the database to SQL CE. if you generate again, the SSDL provider information will match SqlCe and your application should work.

谢谢,

Zafar Abbas

Zafar Abbas


这篇关于切换到另一个数据库(从SQL 2005到Sql CE)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆