[RESOLVED] Replace Missing DataTable Values
Hi - I am having a problem trying to replace the missing values in my Dataset tables with a default string. The columns in my datatables should be all strings.
Here's the code I am using, but I am getting the DBNull to string conversion error.
Code:
For i = 0 To MyDs.Tables(j).Columns.Count - 1
For k = 0 To MyTable.Rows.Count - 1
IIf(IsDBNull(Trim(MyDs.Tables(j).Rows(k)(i).Value)), "None", Trim(MyDs.Tables(j).Rows(k)(i).Value))
Next
Next
"We are what we repeatedly do. Excellence, therefore, is not an act, but a habit.", Aristotle