I have a Datatable that uses an MS Access database table.
In my program I select a row in the datatable, perform some procedures checking the name of the field and changing the text.
Then in the end I want to update the columns in the row but it doesn't happen. What am I doing wrong?
Code:Private Sub BtnCompare_Click(sender As Object, e As EventArgs) Handles BtnCompare.Click 'and now for the hard part. compare the filenames Dim DocName As String Dim olddocname As String Dim newdocname As String Dim sFinalName As String Dim sGetDatum As String Dim sDISnummer As String Dim sXPPost As String Dim sExt As String Dim i, j As Integer Dim dt4 As DataTable = GetMyTable("SELECT * FROM Documents;") Dim row As DataRow For Each row In dt4.Rows DocName = row.Item("Document Name") --> doing some procedures here......... 'lets update the table row.Item("Document Name") = sFinalName row.Item("DISnummer") = sDISnummer row.Item("XPostnummer") = sXPPost newdocname = "" sFinalName = "" Next UpdateListview() End Sub




Reply With Quote
