I have 5*5 datatable which is generated from a sql query.
All values are of datetime type.
Some random values in this dt can be null in db which returns value as DBNull.
Next step is to assign these values to specific variables for which I use function like
Convert.ToDateTime(Dt.Rows(index).Item(“columnName”))
This function throws an error when NULL value is passed from SQL query.
Object cannot be cast from DBNull to other types.
Looking for best way to handle the situation.
I can always loop through the datatable and individually handle the specific null data.
Looking for a way that helps me use a multi assign activity where it skips assignment in case it finds a DBNull