The error message speaks for itself. There is no row at position 0 so you cannot get the row at position 0. Your Do loop should be using a pre-condition to allow for that rather than a post-condition:
vb Code:
MaxRows = ds.Tables("TTDB").Rows.Count
Do Until inc = MaxRows
ListBox1.Items(inc) = ds.Tables("TTDB").Rows(inc).Item("TeacherName") - error message from this segment
inc = inc + 1
Loop
Now the condition will be tested BEFORE each iteration so you'll never enter the loop if there aren't any rows.
That said, you really shouldn't be using a Do loop there anyway. a Do loop should be used for a condition not related to counting. If you can count the iterations then a For loop is far more suitable than a Do loop:
vb.net Code:
Dim rows As DataRowCollection = ds.Tables("TTDB").Rows
For i As Integer = 0 To rows.Count - 1
ListBox1.Items(i) =rows(i)("TeacherName")
Next