Using SQL Server 2008 and SQL Server 2005 and date time

I've built a entity framework model against a 2008 database. All works ok against the 2008 database. When I try to update the entity on a 2005 database I get this error.

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

I specifically did not use any 2008 features when I built the database. I can't find any reference to datetime2 in the code. And, yes the column is defined as "datetime" in the database.


A quick google points me to what looks like the solution.

Open your EDMX in a file editor (or “open with…” in Visual Studio and select XML Editor). At the top you will find the storage model and it has an attribute ProviderManifestToken. This has should have the value 2008. Change that to 2005, recompile and everything works.

NOTE: You'll have to do this every time you update the model from database.

Need Your Help

Virtuoso Jena provider query alias syntax

java alias sparql jena virtuoso

I have in Java the following code, that uses the Virtuoso Jena provider API. I would like to do a query using an alias. I tried putting parenthesis but nothing worked. If I put the same query in the

Fluent NHibernate: cannot cast PersistentGenericBag to type 'System.Collections.Generic.ISet`

nhibernate fluent-nhibernate

I have an object Topic which is a self-related hierarchy where the child Topics are defined as

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.