Database Objects
Hi-Integrity Systems
HomeVB6 Documentation › IDatabaseObjects.OrderBy


IDatabaseObjects_OrderBy As SQLSelectOrderByFields

This function should return an SQLSelectOrderByFields object containing the list of fields the collection will be sorted by. Just as with an SQL statement, the order of the fields added to the collection indicates the group sorting. If IDatabaseObjects_TableJoins has been implemented then fields from the adjoining table or tables can be utilized. The sort order is used by the ObjectByOrdinal, ObjectByOrdinalFirst and ObjectsSearch functions. Implementing this function is optional.

Private Function IDatabaseObjects_OrderBy() As SQLSelectOrderByFields 'Sort the products by their product code Set IDatabaseObjects_OrderBy = New SQLSelectOrderByFields IDatabaseObjects_OrderBy.Add "ProductCode", dboOrderAscending End Function

This interface function/property is utilised by the following functions:
ObjectByOrdinal, ObjectByOrdinalFirst, ObjectsCollection, ObjectsSearch