i want to retrieve 2nd row of a column from datareader object...
i want to show 1st row value of datareader..... if seattype_code == "00", 2nd row value if seattype_code == "01"...and so on.....
what method shud i use for dr..as it is not working that i tried..?
dr = cmd.ExecuteReader();
if (dr.HasRows)
{
if(dr.Read())
{
if(seattype_code == "00")
{
lblSeatType.Text = dr.GetString(0).ToString();
}
else
if (seattype_code == "01")
{
lblSeatType.Text = dr.GetInt32(1).ToString();
}
else if (seattype_code == "02")
{
lblSeatType.Text = dr.GetInt32(2).ToString();
}
else if (seattype_code == "03")
{
lblSeatType.Text = dr.GetChars.GetString(3).ToString();
}
thnx in advance..