I have my
<asp:GridView ID="gridView" runat="server"> I bind it like this :
SqlCommand myCommand = myConnection.CreateCommand();
myCommand.CommandType = CommandType.StoredProcedure;
myCommand.CommandText = "sp_SelectWeek";
SqlDataReader myReader = myCommand.ExecuteReader();
gridView.DataSource = myReader;
but when I run it It takes off one rowfrom the query. I'm sure of this because I tried it with a table and all the rows where there. I build a chart from the same query and you clearly see that I have one row missing :
What am I doing wrong ?
before you pass the reader as a data source. So you moved the record pointer effectively. Thereby losing your one row. Just don't call Read and you should be good.