none
Iterate through dataset and write rows and coloumns to a string (vb.net, vs 2005) RRS feed

  • Question

  • Hi I'm trying to iterate through my dataset which can contain up 5 tables and write the rows and columns that are present within the tables to a string, which will then be passed to a send email function. However I'm not quite sure how to get all rows and columns into a string...this is what I have so far:

    Dim table As DataTable
    Dim myString as String
    Dim row As DataRow
    Dim column As DataColumn
       ' For each table in the DataSet, print the row values.
       For Each table in MyDataSet.Tables
          For Each row In table.Rows
             For Each column in table.Columns
                'Console.WriteLine(row(column))
                EventLogHelper.LogError(row(column))
                ' ??? - MyString = ????
               
             Next column
          Next row
       Next table

    Any suggestions/ advice would be very weolcome
    • Moved by VMazurModerator Monday, May 11, 2009 10:21 AM (From:ADO.NET Data Providers)
    Saturday, May 9, 2009 8:54 AM

Answers