error to find in min and max values
<pre><code>    String sql = "select  title, song_id from up_song where Song_type='Mp3 Tracks' ";
    SqlDataAdapter adpt = new SqlDataAdapter(sql, cn);
    DataSet ds = new DataSet();
    adpt.Fill(ds, "title");
    var m = ds.Tables["title"].AsEnumerable().Max(x =&gt; x.Field&lt;int&gt;("song_id"));
    var k = ds.Tables["title"].AsEnumerable().Min(x =&gt; x.Field&lt;int&gt;("song_id"));
 for (i = m; i &gt;= k; --i)
        {
            try
            {
                hp[i] = new HyperLink();
                hp[i].ID = "hp" + i;
                hp[i].Text = ds.Tables["title"].Rows[i].ItemArray[0].ToString();
                hp[i].NavigateUrl = "Downloadpage.aspx";
                hp[i].ForeColor = System.Drawing.Color.White;
                Panel1.Controls.Add(hp[i]);
                Panel1.Controls.Add(new LiteralControl("&lt;br&gt;"));
                HttpCookie coo = new HttpCookie("song");
                coo["sogtit"] = ds.Tables["title"].Rows[i].ItemArray[0].ToString();
                Response.Cookies.Add(coo);
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
            }
        }
    }
</code></pre>

<p>here i stuck with one error and error is:</p>

<p>There is no row at position 9.There is no row at position 8.There is no row at position 7.</p>

<p>so what is problem in code???</p>

<p>i can not access values from DB what is the another solution thanks?</p>
