April 2002
Intermediate to advanced
416 pages
11h 50m
English
The DataRow object represents a record in the DataTable. Its Item method provides access to its field values.
You have already seen some of the more useful DataRow properties and methods in the previous sections. The following sections review some of those methods and refer to the earlier sections for examples.
The Item method gives access to the row’s field values. The most common ways to find a value in the Item collection are by field name and by number. For example, the following code sets the value of a DataRow’s LastName field and then displays the value of its first field:
data_row.Item("LastName") = "Stephens"
MsgBox(data_row.Item(0)) The Item method can also take a DataColumn object as an index. Because the DataColumn’s ...
Read now
Unlock full access