Resolving errors: SQL

Source: Internet
Author: User
Tags datetime execution stack trace
asp.net|sql|xml| Error | resolution | data | data type

Occurrence scenario:
1: If the datasheet uses an XML data type
2: Use asp.net 2.0
3:: Use Wizard to generate SqlDataSource with DetailsView new/updated database XML data types

Error message:
Server Error in '/' Application.
--------------------------------------------------------------------------------

Operand type Clash:sql_variant is incompatible with XML
Description:an unhandled exception occurred during the execution of the current Web request. Please review the "stack Trace for" Information about the error and where it originated in the code.

Exception Details:System.Data.SqlClient.SqlException:Operand type Clash:sql_variant is incompatible with XML

Source Error:

An unhandled exception is generated during the execution of the current Web request.  Information regarding the origin and location of the exception can be identified using the exception stack trace below.


 


Solution:


<DeleteParameters>


<asp:parameter name= "Original_articleid" type= Int32 "/>"


<asp:parameter name= "Original_title" type= "String"/>


<asp:parameter name= "Original_categoryid" type= Int32 "/>"


<asp:parameter name= "original_contents" type= "String"/>


<asp:parameter name= "Original_articlefrom" type= "String"/>


<asp:parameter name= "Original_createdate" type= "DateTime"/>


<asp:parameter name= "Original_keywordxml" type= "Object"/>


</DeleteParameters>


<UpdateParameters>


<asp:parameter name= "Title" type= "String"/>


<asp:parameter name= "CategoryID" type= Int32 "/>"


<asp:parameter name= "Contents" type= "String"/>


<asp:parameter name= "Articlefrom" type= "String"/>


<asp:parameter name= "CreateDate" type= "DateTime"/>


<asp:parameter name= "Keywordxml" type= "Object"/>


<asp:parameter name= "Original_articleid" type= Int32 "/>"


<asp:parameter name= "Original_title" type= "String"/>


<asp:parameter name= "Original_categoryid" type= "Int32"/>


<asp:parameter name= "original_contents" type= "String"/>


<asp:parameter name= "Original_articlefrom" type= "String"/>


<asp:parameter name= "original_createdate" type= "DateTime"/>


<asp:parameter name= "Original_keywordxml" type= "Object"/>


</UpdateParameters>


<InsertParameters>


<asp:parameter name= "Title" type= "String"/>


<asp:parameter name= "CategoryID" type= Int32 "/>"


<asp:parameter name= "Contents" type= "String"/>


<asp:parameter name= "Articlefrom" type= "String"/>


<asp:parameter name= "CreateDate" type= "DateTime"/>


<asp:parameter name= "Keywordxml" type= "Object"/>


</InsertParameters>


the underlined part type= "Object"-〉type= "String"







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.