The SQL Server version used does not support the data type "datetime2" SOLUTION

Source: Internet
Author: User
The SQL Server version used does not support the data type datetime2 solution 2011-09-0714: 35652 people read comments (1) collect reports sqlserversqlserver database filexml error cause, when using ado. when netentity is used, entity uses sqlserver2008, but later it is actually used

The SQL Server version used does not support the data type datetime2 solution 652 people read comments (1) collect and report the cause of the filexml error in the SQL serversqlserver database. When using ado.net entity, entity uses the SQL Server 2008 database, but later it is actually used

UseSQL ServerVersionNoSupportedDataType"Datetime2"SolutionSolution

652 people read comments (1) collect reports

SQL serversqlserverDataLibrary filexml

Cause of error, inUseWhen ado.net entity is used, entityUseOfDataThe database is sqlserver 2008, but then the actualUseMediumUseOfDataThe database is sqlserver 2005

UseSQL ServerVersionNoSupportedDataType"Datetime2"

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

SolutionSolution

Open your EDMX in a file editor (or "open ..." In Visual Studio and select XML Editor ). at the top you will find the storage model and it has an attribute ProviderManifestToken. this has shoshould have the value 2008. change that to 2005, recompile and everything works.

Open your edmx file, search for the ProviderManifestToken value, and change it to 2005 ~~~~~~~~~

Yesterday, Visual Studio 2005 + SQL Server2005 was used for a simple update using the GridView.DataIs an error.

The error message is as follows:

Analyze the cause of the error:

  

The GridView uses sqlsponseDataBIND: The Insert, Delete, and Update statements are generated during binding, and the edit and Delete functions are enabled. However, when running, click Edit to modifyDataClick Update. This error andDataThe database table has DateTimeTypeFields.

  SolutionSolution:

  

Open the page, switch to the Source view status, and findDataSource sqlperformance1, find the code

Change DbType = "Date" to DbType = "DateTime"

  

Save and refresh the page!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.