title: Get the highest value from a given column in a datatable
body: <p>I have a datatable that has a column "Pending Approval Number".  I need to get the highest number in that column to display to a user as the next available.  I have seen some examples of how to do this but I have not been able to get them to work.  I know i could loop each DataRow in the DataTable and check the value and store it if it is higher than the last. But I know there has to be a better way.</p>
  
  <p>Here is how the DataTable is filled.</p>
  
  <pre><code>strSQL = "Select * from JobInvoice";
  DataTable dtApprovalNumber = new DataTable();
  MySqlDataAdapter daApprovalNumber = new MySqlDataAdapter(strSQL, conn);
  daApprovalNumber.Fill(dtApprovalNumber);
  </code></pre>
  
  <p>A change to the SQL query or code to pull it from the datatable are both welcome.</p>
  
  <p>EDIT: After getting the solution for my original numeric column, I found the second column that I need to do this for is string.  The solution was also provided below.</p>