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"