如何在Visual Studio 2012中作为数据源连接到SQL Server Compact 3.5文件? [英] How can I connect to a SQL Server Compact 3.5 file as a data source in Visual Studio 2012?

查看:124
本文介绍了如何在Visual Studio 2012中作为数据源连接到SQL Server Compact 3.5文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio 2012附带了SQL Server Compact 4.0.我已经从 http://www安装了SQL Server Compact 3.5. microsoft.com/en-GB/download/confirmation.aspx?id=5783 但是,我仍然只能选择与SQL Server Compact 4.0文件建立新的数据连接,而我需要获取数据的文件来自SQL Server Compact 3.5文件.

Visual Studio 2012 comes with SQL Server Compact 4.0. I have installed SQL Server Compact 3.5 from http://www.microsoft.com/en-GB/download/confirmation.aspx?id=5783 However I still only have the option of making a new data connection to a SQL Server Compact 4.0 file, whereas the files I need to get data from are SQL Server Compact 3.5 files.

是否可以连接到SQL Server Compact 3.5文件作为Visual Studio 2012中的数据源?如果是这样,我需要哪些设置或安装?

Is it possible to connect to a SQL Server Compact 3.5 file as a data source in Visual Studio 2012? If so which settings or installs should I need?

推荐答案

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 的博客文章

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.

这篇关于如何在Visual Studio 2012中作为数据源连接到SQL Server Compact 3.5文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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