title: no database selected c# MySqlDatabase
body: <p>I have used this connection to my program several times, but this time when i run the program it keeps saying "no database selected". </p>
  
  <p>I need the code to Count rows in MySqlDatabase table "aktiviteter" and add 1 to that number and insert it to my textbox "idAk_txt"</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.Windows.Forms;
  using MySql.Data.MySqlClient;
  
  public OpretAktivitet()
          {
             HentAntal();
          }
   private void HentAntal()
          {
              string constring = "datasource=localhost;port=3306;username=root;password=*********";
              string Query = "select count(*) as antal from aktiviteter";
              MySqlConnection conDatabase = new MySqlConnection(constring);
              MySqlCommand cmdDatabase = new MySqlCommand(Query, conDatabase);
              MySqlDataReader myReader;
  
              try
              {
                  conDatabase.Open();
                  myReader = cmdDatabase.ExecuteReader();
  
                  while (myReader.Read())
                  {
  
  
                      int antal = Convert.ToInt32(myReader.GetString("antal").ToString()); ;
  
                      antal += 1;
  
                      idAk_txt.Text = Convert.ToString(antal);
  
  
                  }
  
              }
              catch (Exception ex)
              {
                  MessageBox.Show(ex.Message);
              }
  
          }
  </code></pre>