The SQL Server version used does not support the "date" data type solution)

Source: Internet
Author: User

Analyze the cause of the error:

The gridview uses sqlsponse for Data Binding. When binding, the insert, delete, and update statements are generated, and the edit and delete functions are enabled. However, when running, click Edit, after you modify the data, click Update. This error is related to the datetime field in the database table.

 

Solution:

Open the page, switch to the Source view status, find the data source sqlperformance1 bound to the gridview, and findCode

<Updateparameters>
<Asp: parameter name = "userid" type = "string"/>
<Asp: parameter name = "username" type = "string"/>
<Asp: parameter name = "sex" type = "int32"/>
<Asp: parameter name = "JG" type = "string"/>
<Asp: parameter name = "Address" type = "string"/>
<Asp: parameter dbtype = "date" name = "bthday"/>
<Asp: parameter name = "school" type = "string"/>
<Asp: parameter dbtype = "date" name = "bysj"/>
<Asp: parameter name = "mobile" type = "string"/>
<Asp: parameter name = "oid" type = "string"/>
</Updateparameters>

Change dbtype = "date" to dbtype = "datetime"

Save and refresh the page!

Related Article

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.