title: How to count records from database using VB.NET ?
body: <p>I have the code below: </p>
  
  <pre><code> Dim ds As New DataSet
   Dim sda As System.Data.SqlClient.SqlDataAdapter
   Dim sSQL As String
   Dim strCon As String
  
   sSQL = " .... MY QUERY HERE .... "
  
   strCon = appBase.dbConnString
  
   sda = New System.Data.SqlClient.SqlDataAdapter(sSQL, strCon)
   sda.Fill(ds, "MY TABLE FROM DB")
  
  
   dgRecordsContent.DataSource = ds.Tables("MY TABLE FROM DB")
   dgRecordsContent.DataBind()
  
   dgRecordsContent.Visible = True
  
   dbConn.Close()
  </code></pre>
  
  <p>How can I programatically count the number of rows from the datagrid that I'm showing the values in? </p>