Performing Arithmetic on DataTable Columns

G

George Durzi

Nevermind, I discovered the Compute method.

float flMax =
(float)m_dsSegments.Tables["Calculations"].Compute("Max(Score)",
string.Empty);
 
A

Alvin Bruney [MVP]

If your contents are bound to a dataset why don't you just use the dataset
ds.Tables[0].Compute("Max(["+strColumnName+"])",String.Empty)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top