For i As Integer = 1 To dr.DataTable.DataCols.count-1
改成
For i As Integer = 1 To dr.DataTable.DataCols.count-2