Try this:
For Each dr As DataRow in dt.Rows
For Each dc As DataColumn In dt.Columns
Select Case col.ColumnName
Case "Middle Initial"
' Use just the first letter of the middle initial.
dr(dc) = dr(dc).ToString().Substrin
End Select
Next dc
Next dr
Bob
Main Topics
Browse All Topics





by: jfsedlar3rdPosted on 2007-07-24 at 12:16:12ID: 19559080
This is what i have so far:
Dim ColumnName As String
For i = 0 To dt.Rows.Count
For Each col In dt.Columns
ColumnName = col.ColumnName.ToString
Select Case ColumnName
Case "Middle Initial"
'Perform Update here
End Select
Next col
Next