Re: Forms: Controlling Query Order

From: Graham Miller <lgmiller_at_elmrd.u-net.com>
Date: Sat, 10 Jul 1999 04:50:33 GMT
Message-ID: <3786cef5.2004993_at_news.u-net.com>


Hello Craig,

To show the rows in descending order, there must be an 'order by <key field> desc' clause on the form block or the query which returns the rows.
If there isn't a default 'order by' clause then the form will be creating it dynamically. I suggest checking any 'pre-query' triggers to see if they modify the where or order by properties.

To confirm this, run a trace in the session which the form runs in. You will then be able to see the SQL which actually get exected.

graham

On Fri, 09 Jul 1999 18:01:56 -0400, Craig Duncan <crd1_at_mindspring.com> wrote:

>I'm stumped!
>
>We have 2 Form applications (developed elsewhere) whose query
>behavior I would like to emulate.
>
>A query in the Forms (returning all records) does not return in
>standard order. The records are returned in a 'last in, first out'
>manner. That is: the last record entered is the first displayed.
>The code on a 'WHEN-BUTTON-PRESSED' trigger is as follows;
>
>if :System.Mode = 'NORMAL' then
> GO_BLOCK('ML_REP');
> do_key('enter_query');
>else
> do_key('execute_query');
>end if;
>
>
>The query run from the standard menu results in the same order.
>Any query I build behaves in the opposite (standard?) manner.
>The primary key is varchar2: 'YY-xxx'. The x's are generated from
>a sequence, in ascending order.
>
>I've looked all over for some trigger code, environmental setting,
>or something. I just don't see it. Am I missing something?
>I hope so.
>
>Thanks,
>
>Craig Duncan
>
>
Received on Sat Jul 10 1999 - 06:50:33 CEST

Original text of this message