I'm new to WPF. I get the following error: "The best overloaded message match for System.Data.Common.DbDataReader.GetInt32 has some invalid arguments"
My code is as follows:
private void comboBoxDisplay_SelectionChanged(object sender, SelectionChangedEventArgs e)
    {
        string constring = "Data Source=tcp:******.database.windows.net;Initial        Catalog=*****;Persist Security Info=True;User ID=*****;Password=******";
        string Query = "select * from Rewards where Name='" + comboBoxDisplay.Text + "' ;";
        SqlConnection conDataBase = new SqlConnection(constring);
        SqlCommand cmdDataBase = new SqlCommand(Query, conDataBase);
        SqlDataReader myReader;
        try
        {
            conDataBase.Open();
            myReader = cmdDataBase.ExecuteReader();
            while (myReader.Read())
            {
                 string sReid = myReader.GetInt32(0).ToString();
                string sName = myReader.GetString(1);
            }
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message);
        }`
 
     
    