I have a SQL table with a field as INT and allows NULL. For some reason while reading the data using var x = row.Field<int?>("field_name"), I'm seeing this error message System.Data.DataRowExtensions.UnboxT`1.NullableField[TElem](Object value). Any idea what could be causing this?
I have a SQL table with a field as INT and allows NULL. For some reason while reading the data using
var x = row.Field<int?>("field_name")
, I'm seeing this error message System.Data.DataRowExtensions.UnboxT`1.NullableField[TElem](Object value). Any idea what could be causing this?https://github.com/Microsoft/referencesource/blob/master/System.Data.DataSetExtensions/System/Data/DataRowExtensions.cs