Instead of fetching a set of records from a table as a list, it is possible to get a record iterator that will iterate through a set of records one at a time. One way to do this is by first setting the useRecordIterator property of a table. Another is by requesting an iterator directly:
set memberIterator to iterate over the records of memberTable
The next record can then be obtained using the nextValue property of the iterator:
put memberIterator's nextValue into currentMember
Treating the iterator as a list (such as by using the as a list operator) causes it to fetch all of the remaining records.
A record iterator might be convenient in some situations, however it only provides a very small performance advantage, as all of the data is fetched from the database at once but only converted to record objects as requested.