I'm updating some old legacy code and I ran into a problem with the
SqlCommand.ExecuteReader() method. The problem is that it's not returning any
results. However, using SqlDataAdapter.Fill(), I get results back from the
database. What am I doing wrong? How can I get results back using the data
reader?

```
var connectionString = ConfigurationManager.ConnectionStrings["MyConnectionString"].ToString();

using (var sqlConnection = new SqlConnection(connectionString))
{
    using (var sqlCommand = new SqlCommand())
    {
        sqlCommand.Connection = sqlConnection;
        sqlCommand.CommandType = CommandType.Text;
        sqlCommand.CommandText = "SELECT * FROM MyTable WHERE ID = 1";
        sqlConnection.Open();

        // This code works.
        //var dataTable = new DataTable();
        //using (var sqlDataAdapter = new SqlDataAdapter(sqlCommand))
        //{
        //  sqlDataAdapter.Fill(dataTable);
        //}

        // This code is not working.
        using (var sqlDataReader = sqlCommand.ExecuteReader())
        {
            while (sqlDataReader.Read())
            {
                // This fails because the data reader has no results.
                var id = sqlDataReader.GetInt32(0);
            }
        }
    }
}

```