The following example shows how to update the data in the first two columns of the fifth record of the first table in dataset1, accessing the data values with the tables, rows, and items (columns) collection indices:
[Note] The table in the example is Customers from Northwind. Field number 0 is customer ID and field number 4 is Company Name [End Note]
dataset1.Tables(0).Rows(4).Item(0) = "ABCDE" dataset1.Tables(0).Rows(4).Item(1) = "My Company" |
We can also replace the indices with column names if we like. This code makes the necessary changes in the table.