title: Count number of row in a specific datatable?
body: <p>I have a dataset contains two tables. The first one contains the column named "Equipment availability"
  The second one is not. I want to count the number of rows in the first table but my code doesn't work. It counts the total number of two tables?</p>
  
  <pre><code>Private Sub GetNumber(ByVal dataSet As DataSet)
      Dim table As DataTable
      Dim row As DataRow
      Dim column As DataColumn
      Dim count_value As Long = 0
      Dim count_row As Long = 0
      For Each table In dataSet.Tables
          For Each column In table.Columns
              If column.ColumnName = "Equipment availability" Then
                  count_row += table.Rows.Count
                  For Each row In table.Rows
                      If Not IsDBNull(row(column)) AndAlso row(column) = 1 Then
                          count_value += 1
                      End If
                  Next row
              End If
          Next column
      Next table
      TextBox1.Text = count_value
      TextBox2.Text = count_row
  </code></pre>