How can I connect to a SQL Server Compact 3.5 file as a data source in Visual Studio 2012?

放肆的年华 提交于 2020-01-14 03:48:19

问题


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.

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?


回答1:


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

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.

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 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.



来源:https://stackoverflow.com/questions/13066973/how-can-i-connect-to-a-sql-server-compact-3-5-file-as-a-data-source-in-visual-st

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!