服务器上的ASP.NET Datetime2问题

时间:2013-06-14 12:34:01

标签: asp.net

在我的ASP.NET应用程序中,一切都在本地运行时按预期工作,但是当我发布服务器时,我收到以下错误:

"The version of SQL Server in use does not support datatype 'datetime2'."

如何解决此错误?

2 个答案:

答案 0 :(得分:3)

If you are using Entity Framework model in your project.
Then open entity model in html or xml mode. and change ProviderManifestToken="2008"
to ProviderManifestToken="2005". after that publish on server then check and let me know.

答案 1 :(得分:1)

根据这篇文章,SQL server 2008+支持datetime2。我假设您的服务器不运行SQL 2008+,但您的本地SQL Express运行。

Difference between datetime and datetime2