[英]Set Visual Studio to create mdf file that SQL Server 2005 supports
I am using Visual Studio 2010 and I added service–based database ( .mdf
file ) to my project. 我正在使用Visual Studio 2010,并且已将基于服务的数据库(
.mdf
文件)添加到我的项目中。
The issue is that in the deployment server we have only SQL Server 2005 BUT SQL Server 2005 doesn't support the .mdf
file that Visual Studio 2010 created. 问题在于,在部署服务器中,我们只有SQL Server 2005 BUT SQL Server 2005不支持Visual Studio 2010创建的
.mdf
文件。
I can't change the SQL Server in the deployment server so my question is there any why to tell Visual Studio to create an .mdf
file that SQL Server 2005 supports? 我无法在部署服务器中更改SQL Server,所以我的问题是为什么要告诉Visual Studio创建SQL Server 2005支持的
.mdf
文件?
If so - what will be the impact to my code 如果是的话-对我的代码有什么影响
You can always export the SQL script of your database out of any server version and execute the script on another (including lower) version of the server. 您始终可以从任何服务器版本中导出数据库的SQL脚本,并在另一个(包括较低版本)服务器上执行该脚本。
Since the script can contain both metadata and actual data, this option should make your database compatible with SQL 2005 even if you use a newer version on the development machine. 由于脚本可以包含元数据和实际数据,因此即使您在开发计算机上使用较新的版本,此选项也应使您的数据库与SQL 2005兼容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.