您的位置:首页 > 数据库

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

2010-11-30 22:59 567 查看
如果你使用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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐