title: extract COUNT(column) from mySQL to VB.NET
body: <p>Hey guys I have to extract some values from my DB and put them on my textbox. There's a problem at :</p>
  
  <pre><code> TextBox1.Text = TextBox1.Text &amp; DR.Item("id") &amp; Space(3) &amp; DR.Item("Nume") &amp; Space(3) &amp; DR.Item("COUNT(pontaj.prezente)")
  </code></pre>
  
  <p>Error in VB:</p>
  
  <p><img src="https://i.imgur.com/DTPXxcl.png" alt="Error in VB"></p>
  
  <p>This is how my select looks like:</p>
  
  <p><img src="https://i.stack.imgur.com/yPpGy.png" alt="enter image description here"></p>
  
  <pre><code> Dim dbCon = New MySqlConnection("Server = localhost;Database = users; Uid=root; Pwd = password ")
          'SELECT users1.id,users1.Nume, COUNT(pontaj.prezente) FROM users1, pontaj WHERE users1.id = pontaj.id
  
          Dim strQuery = "SELECT users1.id,users1.Nume, COUNT(pontaj.prezente)" &amp; _
              "FROM users1, pontaj "
  
  
  
          Dim SQLCmd = New MySqlCommand(strQuery, dbCon)
  
          '  Pwd = password
  
          ' Open
  
          dbCon.Open()
  
          Dim DR = SQLCmd.ExecuteReader
          TextBox1.Text = TextBox1.Text &amp; DR.Item("id") &amp; Space(3) &amp; DR.Item("Nume") &amp; Space(3) &amp; DR.Item("COUNT(pontaj.prezente)") &amp; vbCrlf
          While DR.Read
  
  
          End While
  
          'Close
  
          DR.Close()
          dbCon.Close()
  </code></pre>