I've done research on this but none of results found does what I'm looking for.
Suppose I have a DataTable that was filled from a MySql database, in another function, I want to access one of the columns and assign the values to a variable (one at time in a loop)
Some code to illustrate what I'm trying to do:
Dim adapter As New MySqlDataAdapter
Dim dt As New DataTable
Dim intList As New List(Of Integer)
.......
.......
adapter.fill(dt)
.......
.......
dim col = dt.Columns(1)
populate the list here with the contents of the column
EDIT I am not entirely sure that Columns(1)
is correct syntax