posted 12 years ago
Inside your while loop you are only populating one of the fields on each iteration. This means that hasNext() will return false before you completed populating your fields. You want to populate all your fields for each record on each iteration and therefore you need to increment "i" every time you issue sc.next();