setSort( )

Creates an internal list of the records in the AGDBSet object and sorts them according to the specified column and order.

Interface

AGDBSet

IDL definition
void setSort(
  const String name,
  boolean ascendSort
);
ADO equivalent

None

JavaScript synopsis
dbset.setSort(name, ascendSort)
C synopsis
void AVsetSort(
  AGDBSet* dbset,
  const PODSString name,
  PODSBoolean ascendSort
);
Parameters
  • dbset   The AGDBSet object.

  • name   [in] The name of the field by which to sort.

  • ascendSort   [in] Boolean indicating whether to sort in ascending or descending order.

Returns

None

Remarks

You can call addNew( ) and deleteRow( ) while a sort is active. These rows will show up at the end of the AGDBSet object regardless of their data values. Call setSort( ) to make sure these new/deleted rows are in the correct order. If a filter is active, only those records will be sorted. Only one sort is active at a time. If you call setSort( ) twice, the original sort is removed and the second one becomes active.

Note: For performance reasons, the size of the string values to be sorted is limited to the first 1024 characters for Palm OS and 1024*10 for WinCE.

See also

addNew( ), deleteRow( ), createSearch( )