无法打开数据库,因为它是版本706.此服务器支持版本661及更早版本[复制]

时间:2021-12-27 06:26:38

This question already has an answer here:

这个问题在这里已有答案:

I am new in asp.net c# coding and I created a simple website connected to the database using visual studio express 2013. After I finished making the website I tried uploading the files on a hosting website, everything works fine but when I tried uploading the database.mdf file and then attach it, I got this error message:

我是asp.net c#编码的新手,我创建了一个使用visual studio express 2013连接到数据库的简单网站。在我完成网站制作后,我尝试在托管网站上传文件,一切正常,但当我尝试上传时database.mdf文件,然后附加它,我收到此错误消息:

Error attaching database. System.Data.SqlClient.SqlException (0x80131904): The database 'my_Database' cannot be opened because it is version 706. This server supports version 661 and earlier.

附加数据库出错。 System.Data.SqlClient.SqlException(0x80131904):无法打开数据库'my_Database',因为它是版本706.此服务器支持版本661及更早版本。

I tried changing SQL Server instance name from (LocalDB)\v11.0 to SQL Server 2008 but it didn't work.

我尝试将SQL Server实例名称从(LocalDB)\ v11.0更改为SQL Server 2008,但它不起作用。

The hosting site I am using is aspspider.com.

我使用的托管网站是aspspider.com。

1 个解决方案

#1


0  

The error means that the database.mdf file that you are using was created with Sql Server 2012, whereas your hosting provider only has Sql Server 2008 installed.

该错误意味着您使用的database.mdf文件是使用Sql Server 2012创建的,而您的托管服务提供商仅安装了Sql Server 2008。

You need to either recreated database.mdf locally with Sql Server 2008, or see if your hosting provider can upgrade you to Sql Server 2012.

您需要在本地使用Sql Server 2008重新创建database.mdf,或者查看您的托管服务提供商是否可以将您升级到Sql Server 2012。

Looking at aspspider, they only seem to provide free hosting with Microsoft Sql Server 2008 Express Edition. You can download a copy of it from here. Install this locally, use it from your app, and then upload it to the hosting provider.

看看aspspider,他们似乎只提供免费托管与Microsoft Sql Server 2008速成版。您可以从这里下载它的副本。在本地安装,在您的应用程序中使用它,然后将其上传到托管服务提供商。

#1


0  

The error means that the database.mdf file that you are using was created with Sql Server 2012, whereas your hosting provider only has Sql Server 2008 installed.

该错误意味着您使用的database.mdf文件是使用Sql Server 2012创建的,而您的托管服务提供商仅安装了Sql Server 2008。

You need to either recreated database.mdf locally with Sql Server 2008, or see if your hosting provider can upgrade you to Sql Server 2012.

您需要在本地使用Sql Server 2008重新创建database.mdf,或者查看您的托管服务提供商是否可以将您升级到Sql Server 2012。

Looking at aspspider, they only seem to provide free hosting with Microsoft Sql Server 2008 Express Edition. You can download a copy of it from here. Install this locally, use it from your app, and then upload it to the hosting provider.

看看aspspider,他们似乎只提供免费托管与Microsoft Sql Server 2008速成版。您可以从这里下载它的副本。在本地安装,在您的应用程序中使用它,然后将其上传到托管服务提供商。