如果说我想把一个字段从数据库里提取出来的做法应该是Dim cmd As New SQLCommand
Dim dt As DataTable
Dim lst As WinForm.ListBox = e.Form.Controls("ListBox")
cmd.C
cmd.CommandText = "SELECT dbjh1 From kfpt_daa051 "
dt = cmd.ExecuteReader()
lst.Combolist = dt.GetComboListString("dbjh1")
这样的话所有的dbjh1就提取出来并展示到ListBox里面了。但是如果我想提取一行的多个列的话该怎么办?比如
Dim cmd As New SQLCommand
Dim dt As DataTable
Dim lst As WinForm.ListBox = e.Form.Controls("ListBox")
cmd.C
cmd.CommandText = "SELECT dbjh1,dbjh2,dbjh3,dbjh4,dbjh5,dbjh6,dbjh7 From kfpt_daa051 where jh = '12M190-160' "
dt = cmd.ExecuteReader()
lst.Combolist = dt.GetComboListString这句话应该怎么想,如果用到遍历的话应该怎么写?或者有其他的简单办法么?谢谢啦~~