Hi. I would like to know how do i obtain the maximum value of all the records in a datatable of a particular column?
For example:
So now i have all my students record in the dtStudents datatable. How do i determine the maximum value of the StudentID?Code:Dim da As New SqlDataAdapter Dim dtStudents As New DataTable da.SelectCommand = New SqlCommand("SELECT StudentID, Name FROM Students", myConnection) da.Fill(dtStudents)
Thanks in advance,
Archaven




Reply With Quote