DataSet ->Table ->Row ->Column

Get From MSDN, this example give out how to  use DataSet struct

 

private void PrintRows(DataSet dataSet)
{
    // For each table in the DataSet, print the row values.
    foreach(DataTable table in dataSet.Tables)
    {
        foreach(DataRow row in table.Rows)
        {
            foreach (DataColumn column in table.Columns)
            {
                Console.WriteLine(row[column]);
            }
        }
    }
}


posted on 2011-10-28 13:20  子虚乌有  阅读(230)  评论(0)    收藏  举报