Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted

1 solution

C#
foreach (DataTable table in dataSet.Tables)
{
    foreach (DataRow row in table.Rows)
    {
        foreach (object item in row.ItemArray)
        {
            // read item
        }
    }
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900