且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Visual Studio 2012中作为数据源连接到SQL Server Compact 3.5文件?

更新时间:2023-02-22 18:34:01

Ray Chen 发表了答案:

Over in a thread I started on SQL Server Developer Center > SQL Server Forums > SQL Server Compact Ray Chen has posted an answer:

不幸的是,VS 2012确实不支持SQL Server CE 3.5. 您必须以 Erik的身份将SQL Server CE 3.5数据库升级到4.0. 建议 [添加了链接].另外,请看一下这篇文章: Visual Studio 2012年 兼容性. 在这些资产需要您注意"部分中,它说:单向 升级.您必须先升级这些资产,然后才能在其中打开它们 Visual Studio2012.升级后,您将无法打开它们 在以前的版本中.下表列出了项目类型, 文件类型和必须升级的技术.和SQL Server CE 该表中包含3.5.

Unfortunately, SQL Server CE 3.5 is not supported in VS 2012 indeed. You have to upgrade the SQL Server CE 3.5 database to 4.0 as Erik suggested [link added]. Also please take a look at this article: Visual Studio 2012 Compatibility. In the section of ‘These Assets Need Your Attention’, it says: One-way upgrade. You must upgrade these assets before you can open them in Visual Studio 2012. After you upgrade, you won’t be able to open them in previous versions. The following table lists the project types, file types, and technologies that you must upgrade. And SQL Server CE 3.5 is included in the table.

我在此处发布了一个附属问题,以了解如何在无法读取文件的情况下将其转换为SQL Server Compact 4.0.

I've posted a subsidiary question there to find out how, given that I cannot read in the file, I would convert it to SQL Server Compact 4.0.

===========编辑=========

=========== EDIT ==========

Ray Chen 继续发布了对ErikEJ 的博客文章 SqlCeEngine.Upgrade方法(字符串)库页面.

Ray Chen went on to post references to ErikEJ's blog post HOW TO: Upgrade a version 3.x database file to SQL Server Compact 4.0 and to the SqlCeEngine.Upgrade Method (String) library page.