Private Sub WriteTxt_dt(ByVal dt As DataTable, ByVal path As String)
Dim sw As StreamWriter = New StreamWriter("D:\" & path & ".txt")
Dim FRow As DataRow()
FRow = dt.Select("", "", DataViewRowState.CurrentRows)
For Each r1 In FRow
Dim lineoftext = r1("ID").ToString & " = " & r1("NAME").ToString
sw.WriteLine(lineoftext)
Next
sw.Close()
End Sub