System.Data.Linq.Binary不能为Null? [英] System.Data.Linq.Binary cannot be Null?
问题描述
我已经从.net 3.5 beta更新到了决赛。有些东西改变了(.Add => .InsertAfterUpdate),以及其他一些小东西。我的Sql2005图像列的数据类型也更改为System.Data.Linq.Binary。没问题,我已经更改了代码,所以我可以再次保存图像。我的问题是:如何将数据库中的图像设置为null?我的数据库列是可空的,在LinqDataContext中它也可以为空。
但是当我设置我的p.Image = null时,我得到一个异常"Value not not null"。在.net 3.5测试版中它正在运行...
Hi,
I've updated from .net 3.5 beta to the final. Some things changed (.Add => .InsertAfterUpdate), and some other small things. The datatype of my Sql2005 images colums is also changed to System.Data.Linq.Binary. No problem, I've changed the code, so I can save images again. My problem is: how to set the image in the database back to null? My database column is nullable, in the LinqDataContext it is also nullable.
But when I set my p.Image = null, then I get an exception "Value cannot be null". In the .net 3.5 beta it was working...
有人知道如何解决这个问题吗?
Does someone know how to fix this?
推荐答案
有没有人有解决方案?
Does anyone have a solution for this?
这篇关于System.Data.Linq.Binary不能为Null?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!