是否可以运行基于sql

是否可以运行基于sql

本文介绍了是否可以运行基于sql server 2008的应用程序来运行2005的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基于VS 2010的.NET 4.0,SQL Server 2008应用程序。



自从10个月以来,我一直在开展一个项目,现在完成了。我转到创建软件安装的下一个任务。它也做了。但是现在我有一个很大的问题。



我的客户端已经运行运行SQL Server 2005的软件,并将其安装在系统上。但是当我打包我的VS2010 C#应用程序时,我将其部署在SQL Server 2008的前提下,但现在的问题是,当我尝试安装我的应用程序时,它要求卸载 2005 然后安装 2008 。但我的客户非常严格,允许我的程序卸载系统上的任何应用程序。我被困在这里。



我也试图从我的先决条件中删除它,并且应用程序成功安装自身,但是当我尝试运行我的应用程序后,它无法访问数据库。



我该如何解决这个问题?有没有办法使应用程序和数据库都可以使用SQL Server 2005或2008.或者也可以任何其他专家建议。



编辑1 / p>

我也有 Datetime 真的很烦恼的东西,因为我的项目是多语言的,所以我有单独的功能处理要在SQL中插入的日期时间。



编辑2



使用我自己的Visual Studio部署项目将SQL Server 2005升级到2008?



编辑3



这是我得到的错误

编辑4(主)



是否可以使Microsoft SQL Server数据库文件兼容运行SQL Server 2005和SQL Server 2008?

解决方案

通常不会针对任何版本的SQL Server运行应用程序创建数据库管理工作室,您已准备好了。



如果您有设置,您可能需要更改先决条件,以便它可以与SQL Server 2005一起工作。 p>

您可能需要调整连接字符串。在您提供的错误消息中,显然SQL Server的实例名称为 SQLEXPRESS,所以您需要在连接字符串中添加。



另外,并行运行SQL 2005 Express和2008 Express也不是问题。 p>

I have a .NET 4.0, SQL Server 2008 application built on VS 2010.

Since more than 10 months I have been working on a project and its completed now. I moved to the next task of creating an installation of the software. Its also done. But now I have a big issue.

My clients already run software running SQL Server 2005 and its installed on their system. However when I was packaging my VS2010 C# application, I deployed it with prerequisite of SQL Server 2008 but now the problem is, when I try to install my application, it asks to uninstall the 2005 and then to install 2008. But my clients are very rigid to allow my program to uninstall any application on their system. I am stuck here.

I also tried to remove it from my prerequisites and the application was successful to install itself but after when I tried to run my application, its unable to access the database.

How I can solve this issue? Is there any way to make application and database both work with SQL Server 2005 or 2008. Or maybe any other expert advice.

EDIT 1

I also have Datetime stuff which really annoyed with to accomplish, as my project is multilingual so I have separate functions to handle datetime to insert in SQL.

EDIT 2

Is it possible to upgrade SQL Server 2005 to 2008 using my own Visual Studio Deployment Project?

EDIT 3

This is the error I am getting

EDIT 4 (Main)

Is it possible to make a Microsoft SQL Server database file compatible to run with both SQL Server 2005 and SQL Server 2008?

解决方案

It is usually not a problem to run an application against any version of SQL Server. Create the database using Management Studio and you're ready to go.

If you have a setup, you may need to change the prerequisites, so that it works with SQL Server 2005.

You may have to adjust the connection string. In the error message you're providing, it is obvious that the instance name of the SQL Server is "SQLEXPRESS", so you need to add this in your connection string.

Also, it is not a problem to run SQL 2005 Express and 2008 Express side by side.

这篇关于是否可以运行基于sql server 2008的应用程序来运行2005的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 15:03