3

In my ASP.NET application, everything works as expected when running it locally but when I publish the server I get the following error:

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

How can I resolve this error?

Josh Mein
  • 28,107
  • 15
  • 76
  • 87
Umesh Sehta
  • 10,555
  • 5
  • 39
  • 68
  • http://stackoverflow.com/questions/10224406/the-version-of-sql-server-in-use-does-not-support-datatype-datetime2 – Ben Narube Jun 14 '13 at 12:36

2 Answers2

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

According to this article, SQL server 2008+ supports datetime2. I am assuming your server does not run SQL 2008+ but your local SQL Express does.

Difference between datetime and datetime2

Josh
  • 2,248
  • 2
  • 19
  • 38