PA_AddFieldToOrderBy


version 2003


PA_AddFieldToOrderBy (orderByRef; tNum; fNum; oDirection)

Parameter Type Description
orderByRef PA_OrderByRef OrderBy reference
tNum short Table number
fNum short Field number
oDirection char Ordering direction

Description

The routine PA_AddFieldToOrderBy adds the field fNum of the table tNum to the sort criteria for the Order By sequence, previously prepared by PA_OpenOrderBy . The sequence must be closed with a call to PA_CLoseOrderBy which launches the reorder.

The added field can belong to a related table of the main table (the one that is going to be reordered and whose number was given to PA_OpenOrderBy ).

You can have up to 20 fields defined within the sort criteria. It is the developer's responsibility not to exceed this count. If PA_AddToField has already been called 20 times before calling PA_CloseOrderBy , superfluous calls will be ignored.

Example

See PA_OpenOrderBy for an example of use

See Also

PA_CloseOrderBy , PA_OpenOrderBy , PA_OrderBy .

Error Handling

PA_GetLastError

keeps the last error that occurred before calling the routine