开发者

Have issue with typed dataset nullable date value

开发者 https://www.devze.com 2023-03-30 05:54 出处:网络
I开发者_如何转开发 have a datatable in a typed dataset with a date column When I change the NullValue property to return null or empty , vs 2008 wont let me.

I开发者_如何转开发 have a datatable in a typed dataset with a date column When I change the NullValue property to return null or empty , vs 2008 wont let me.

it says

The value entered is not valid for the current data type.

I need to be able to set null values por this column.


If you use typed datasets, you can define that the column is nullable (AllowDBNull) If this property is set to true, you can make use of the methods yourDataRow.SetFieldnameNull() and yourDataRow.IsFieldnameNull() (of course, you have to replace Fieldname with the name of your nullable field)

0

精彩评论

暂无评论...
验证码 换一张
取 消