【发布时间】:2017-07-15 18:10:11
【问题描述】:
我对此进行了研究,但没有找到符合我要求的结果。
假设我有一个从 MySql 数据库填充的 DataTable,在另一个函数中,我想访问其中一列并将值分配给一个变量(循环中的一个)
一些代码来说明我正在尝试做的事情:
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
编辑我不完全确定Columns(1) 是正确的语法
【问题讨论】: