```
     private void Button1Click(object sender, EventArgs e)
     {
         var dt = new DataTable();
         const string Connectionstring = "Data Source=GARETH-PC1;Initial  Catalog=Genres;Integrated Security=True";
        using (var con = new SqlConnection(Connectionstring))
        {
            con.Open();
                var query = "Select Username From Login Where Username ='" + ComboBox1.SelectedText + "' Password ='" + textBox2.Text + "'";
                using (var sda = new SqlDataAdapter(query, con))
                {

                sda.Fill(dt);
            }

        }

        if (dt.Rows[0].ItemArray.GetValue(0).ToString() == "1")

        {
            Hide();

            var ss = new Main();
            ss.Show();
        }
        else
        {
            MessageBox.Show("Invalid Username or Password");
        }
    }

```

The if (dt.Rows[0].ItemArray.GetValue(0).ToString() == "1") - Returns an error saying there's nothing in the table... But there is ..any suggestions?