About RecordSortedList

Hi all,

Can anybody tel me about what RecordsortedList and RecordInsertList is actually doing?

Why we are going for these classes instead of using Temporary Tables?


Use RecordSortedList when you want a subset of data from a particular table, and you want it sorted in an order that does not currently exist as an index.

A RecordSortedList object holds records from a single table. The list has a unique key that is defined by the fields listed by using the sortOrder method.

Records are automatically sorted as they are inserted, they do not have to be inserted in sort sequence.

RecordSortedList objects are particularly useful for passing a result-set as a parameter

There is no limit to the size of a RecordSortedList object, but they are completely memory-based, so there are potential memory consumption problems.

RecordSortedList objects must be server-located before the insertDatabase method can be called. Otherwise, an exception is thrown.

Record level security (RLS) cannot be applied by the RecordSortedList class. RLS is applied by the RecordInsertList class).

Use a RecordSortedList in preference to a temporary table when:

  • only one sort order is needed.

  • the number of records is not too high (to avoid memory problems).

Compared to temporary tables, RecordSortedList objects:

  • are faster

  • are not disk-based

  • only have one index

  • cannot be used in forms

  • require a call between the client and server per (grouped) read


This class lets you insert more than one record into the database at a time, which reduces communication between the application and the database.