• LINQ to SQL 异常:SQL Server does not handle comparison of NText, Text, Xml, or Image data types


    如果你使用LINQ to SQL过程中遇到异常:SQL Server does not handle comparison of NText, Text, Xml, or Image data types,可能你的数据库表字段中使用了NText,Text,Xml或者Image类型,你需要为dbml自动生成类的相应属性的Attribute添加上UpdateCheck=Never。

    需要注意xml在dbml对于的类型为XElement,XElement是引用类型,如果需要对该字段进行更新,不能直接修改,需要重新创建一个XElement,否则所做的修改无法更新到数据库。

    参考链接:Linq to SQL throws an exception when a column is of type ntext

  • 相关阅读:
    重装Win10系统的非常简单的操作教程
    Python
    Delphi
    Libs
    Windows Server
    Windows Server
    Delphi
    Delphi
    Delphi
    Delphi
  • 原文地址:https://www.cnblogs.com/qishichang/p/1892519.html
Copyright © 2020-2023  润新知