Ive been getting an error, I have an error with the entity framework. I have a SQL Server 2005 SP2.
When the ProviderManifestToken = “2008” I get this error.
The version of SQL Server in use does not support datatype 'datetime2'.
Ive done the change shown here and when chagned to “2005” I get
Schema specified is not valid. Errors:
DatabaseAccess.Schema.Model1.ssdl(2,123) : error 0169: All SSDL artifacts must
target the same provider. The ProviderManifestToken '2008' is different
from '2005' that was encountered earlier.
I dont understand
My Database version is Microsoft SQL Server Standard Edition (64-bit) 9.00.3042.00
Ive tried deleting the schema and re adding it to no avail. Restarting etc
Ive alse made all my date time fields nullable
I have seen this before and it is to do with the datetime being Nullable. I think if you break into the code you will see that the value of the date time when you create a new instance of the class is a default(DateTime) and not null and it is this value that is causing the error.
If possible, can you try nulling the DateTime value before saving changes on the context?
I will try to put together a sample demonstrating when and how this occurs.
Found a brief explanation here:
http://dotnetslackers.com/Community/blogs/bmains/archive/2010/11/19/entity-framework-4-and-quot-the-conversion-of-a-datetime2-data-type-to-a-datetime-data-type-resulted-in-an-out-of-range-value-quot.aspx