LiteDAC

TCustomDADataSet.SetOrderBy Method

Builds an ORDER BY clause of a SELECT statement.

Class

TCustomDADataSet

Syntax

procedure SetOrderBy(const Fields: string);

Parameters
Fields
Holds the names of the fields which will be added to the ORDER BY clause.

Remarks

Call the SetOrderBy method to build an ORDER BY clause of a SELECT statement. The fields are identified by the comma-delimited field names.

Note: The GetOrderBy and SetOrderBy methods serve to process only quite simple queries and don't support, for example, subqueries.

Example

Query1.SetOrderBy('DeptNo;DName'); 

See Also

© 1997-2024 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback