how to perform sum up in DataTable?

  • Thread starter Thread starter angus
  • Start date Start date
A

angus

Hi all,

I would like to know how to perform something like

select sum(amt) from table where id>10

in DataTable,

assuming that i have a DataTable dtTable which stores the "select id, amt
from table"

i know that i can

Dim drTemps As DataRow() = dtTable.Select("id>10")

For each drTemp as DataRow in drTemps
' sum up logic here
Next

But is there any other method, supported by ado.net? thank you

Thank you.
 
Back
Top