简体   繁体   English

将Visual Studio设置为创建SQL Server 2005支持的mdf文件

[英]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.

相关问题 如何在Visual Studio中添加SQL Server数据库文件(.mdf)而不安装SQL Server Express Edition? - How to add SQL Server database file (.mdf) in Visual Studio without installing SQL Server Express Edition? 与SQL Server 2005 MDF文件的C#.net数据库连接 - C#.net db connection with sql server 2005 MDF file 如何查询我在Visual Studio的SQL Server中附加的mdf文件? - How to query against a mdf file I attached in SQL Server in Visual Studio? 如何使用本地 mdf 文件在 Visual Studio 中建立 SQL 连接 - How to establish SQL Connection in Visual Studio using local mdf file 创建 SQL Server MDF 数据库文件到 ASP.NET 5 - Create SQL Server MDF database file to ASP.NET 5 SQL Server 2005,Visual Studio 2010和存储过程 - SQL server 2005, Visual Studio 2010 and stored procedures 如何在 Visual Studio 2019 中添加 .mdf 文件? - How to add .mdf file in Visual Studio 2019? 无法通过应用程序,SQL Server Management Studio或VS Server资源管理器访问SQL Server MDF文件 - Cannot access SQL Server MDF file through app, SQL Server Management Studio, or VS Server explorer 如何使用SQL Server数据库在Visual Studio 2017中创建安装文件 - How to create setup file in Visual Studio 2017 with SQL Server database 如何在Visual Studio 2008和SQL Server 2012中创建.exe文件 - How to create .exe file in Visual Studio 2008 and SQL Server 2012
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM