This SQL statement should select the maximum number in the Auto Numbering column ' JOB_no' in my SQL database.


VB Code:
  1. strSQL = "SELECT MAX(JOB_no)"
  2.         strSQL = strSQL & " FROM JOBS"
  3.         strSQL = strSQL & " WHERE myusername = '" & Nowuser & " '"
  4.  
  5.         Call SQL_SELECTconnection()


How do I actually 'use' the result in VB.net 2005 ?
EG MSGBOX (the result of my query?)


I tried - MsgBox(mydataset.Tables(0).Rows(0)("job_No"))
(Which works for a normal select statement), but errors when using 'MAX' - stating job_no is not a valid column of table 'table'.