Here is what I used when I needed to have zero-length strings instead of NULL in a Dataset. It also deletes a row if it consists entirely NULL Strings.
Public Shared Sub _
SetIsNullStringsToEmpty( _
ByVal DataSet As DataSet)
' Set every Type(string) Item that ISnull to String.Empty
Dim dt As DataTable
Dim dc As DataColumn
Dim dr As DataRow
Dim I, J, K As Integer
Dim blnAllNull As Boolean
Dim sName As String = String.Empty
For I = 0 To DataSet.Tables.Count - 1
dt = DataSet.Tables(I)
' Go Backwards for RemoveAt
For J = dt.Rows.Count - 1 To 0 Step -1
dr = dt.Rows(J)
blnAllNull = True
For K = 0 To dr.Table.Columns.Count - 1
' Get Coulumn
dc = dr.Table.Columns(K)
sName = dc.ColumnName
If dc.DataType Is GetType(String) Then
If dr.IsNull(dc.Ordinal) Then
dr.Item(dc.Ordinal) = String.Empty
Else
blnAllNull = False
End If
Else
blnAllNull = False
End If
Next
If blnAllNull Then
dr.Table.Rows.Remove(dr)
End If
Next
Next
End Sub
Forms/Controls Resizing/Tabbing Control
Compare Code (Text)
Generate Sort Class in VB or VBScript