Tharake Gunatilake

Tharake Gunatilake

  • NA
  • 53
  • 73.2k

working with dataset

Jul 2 2013 2:27 AM
dear friends,

i have a database table in MS SQL 2008 with some values like following,

id          value
1 0
2 15
3 35
4 48
5 55

i want to show gap between 2 value rows in labels (or in any other way that u propose).

like,     15-0 = 15      -> 15 in a label
   35-15=20      -> 20 in another label

i tried to get the whole table values to a data set in the code behind.and then read two by two,reduce them and
show them in a table.
But it gives me an exception becoz there is no any row to substract from the last row..

please give me a better solution for this...

Thank you...



Answers (2)