G
Guest
This is my code. If the value coming in from the database table is null, I
wish to place a 0 in the column or otherwise the value itself. Everything I
try this code I get an error. Am I doing this wrong that a null value cannot
be converted to any other type?
If Not Row("MonthsPaid") Is DBNull.Value Then
paid.MonthsPaid = 0
Else
paid.MonthsPaid = Convert.ToInt32(Row("MonthsPaid"))
End If
wish to place a 0 in the column or otherwise the value itself. Everything I
try this code I get an error. Am I doing this wrong that a null value cannot
be converted to any other type?
If Not Row("MonthsPaid") Is DBNull.Value Then
paid.MonthsPaid = 0
Else
paid.MonthsPaid = Convert.ToInt32(Row("MonthsPaid"))
End If