Using Max and Sum on a Dataset - Possible?

  • Thread starter Thread starter Anil Gupte
  • Start date Start date
A

Anil Gupte

What is wrong with this?
Dim strFindMax As String = "max(ProfileID)"

Dim drFindMax As DataRow() = DSet.Tables("Profiles").Select(strFindMax)

I get an error saying strFindMax does not evaluate to a Boolean. What I
really want to do is
Dim intFindMax As Integer = DSet.Tables("Profiles").Select(strFindMax)

Same thing wth Sum. Any ideas on how I can do this, or if there is any
other way?

Thanx,
 
Ah Thanx! In regular SQL, you use Select Max(FiledName) so I just thought
it would work. Thanx a lot for your help.
 
Back
Top