如何使用vb.net循环数据集? [英] how to loop in dataset using vb.net?
本文介绍了如何使用vb.net循环数据集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
示例
Do while ds ..< -------
RichTextBox1.Text = ds.Tables( AddItem)。行(行).Item(colum).ToString()
循环
i想做循环,索引可以将sql命令的所有结果都检索到文本框中,但我不知道怎么把表达式放在Do while / while / for..can任何人的帮助下,任何观点的人
example
Do While ds.. <-------
RichTextBox1.Text = ds.Tables("AddItem").Rows(row).Item(colum).ToString()
Loop
i want to do loop that have index that can retrieve all of the result from sql command into the textbox but i don't know how to put the expression after the Do while/while/for..can anyone help,any opinion guys
推荐答案
foreach (DataTable table in dataSet.Tables)
{
foreach (DataRow row in table.Rows)
{
foreach (object item in row.ItemArray)
{
// read item
}
}
}
这篇关于如何使用vb.net循环数据集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文