Hi. I'm currently stuck on a part in my application.

vb Code:
  1. SQL = "SELECT CourseID FROM Overview"
  2.             Adapter = New OleDbDataAdapter(SQL, Connection)
  3.             DS = New DataSet
  4.             Adapter.Fill(DS)
  5.             If DS.Tables(0).Rows.Count > 0 Then
  6.                 NewTableName = DS.Tables(0).Rows().Item("CourseID").ToString()
  7.             End If

What I'm trying to do. is when the Application Loads, I need it to get the Last INDEX in the CourseID Form and I guess add 1 to it. I forget how do it, but I believe its something to do with Reader and a Integer I guess. Like While Reader = True then Count + 1.


How would I go about doing this? Its something in here

NewTableName = DS.Tables(0).Rows(!HERE!).Item("CourseID").ToString()

That I'm going need a variable or something.