Global Sort Option for select RDBMS

Author: (wpphili)

Bonjour,    we recently upgraded from version 9.4 to 9.6 but more importantly from Sybase driver U2 to U4.  There is a major change in the way the driver handle request to the database.  Using the driver U2, there were index suggestion everywhere witch, in a way, took care of the sorting order of the result.  Now, with the driver U4, there are no more index suggestion, leaving all the decision to the database with an unwanted/unexpected result that rows fetch from the database are no more sorted and are displayed as is in the different forms. My question, besides going into each and every form to add "order by" clause, is there any way to have a global sort somewhere or anything else that could "easily" fix this behavior?   Thanks for your time, support and knowledge.   Regards, William P. Philibert

1 Comment

  1. Hi William, There is no global setting in Uniface to force an order. (And what should it do? return in prim. key order, or in order of the index that the database, unknown to Uniface, used to retrieve the data...) So indeed you have to make sure that there is an "order by" in each read trigger where it is relevant. The easiest way would to add the "order by"'s to the read tiggers in the application model. The Forms will inherit from that, except where you have made a variation on the trigger in the Form. It is not difficult to write on small tool that will make it easier, and helps you not to miss any read triggers. The application model for the Uniface dictionary is in file C:\Program Files (x86)\Uniface\Uniface 9.7.01\uniface\misc\umeta.xml When you import this you get an Application Model DICT. Make a Form on the UXGROUP entity, this contains the component variation on an Entity. Look for all records where the field GETOCC, this is the Read tigger, is not empty.   NB: There are Uniface developers that use a #DEFINE to specify the sort order, that can be quite a handy way to minimize the number of variations of the Read trigger.

    Author: Theo Neeskens (