5

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.

1 Answer 1

12

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)

1
  • How do I bind to this without throwing an exception?? Mar 2, 2016 at 23:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.