NickMalloy
asked on
Help dealing with nulls.
I am trying to figure out the cleanest way to do something
If I am adding rows to a datatable like below, what is the best way to assign a zero if a value in the row is null?
While dr.Read
newrow = dt.NewRow
newrow("Unit") = dr("Unit")
newrow("One") = dr("One")
newrow("DT") = dr("DT")
dt.Rows.Add(newrow)
End While
If I am adding rows to a datatable like below, what is the best way to assign a zero if a value in the row is null?
While dr.Read
newrow = dt.NewRow
newrow("Unit") = dr("Unit")
newrow("One") = dr("One")
newrow("DT") = dr("DT")
dt.Rows.Add(newrow)
End While
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.