Re: Query Hits Question

From: Alex Heney <heneya_at_entcf3.agw.co.bt.uk>
Date: 1997/04/21
Message-ID: <335B86F5.2054_at_entcf3.agw.co.bt.uk>#1/1


Joseph Strano wrote:
>
> In the PRE-QUERY trigger, use DBMS_SQL to fire the same query that the
> block is based on, but have it return a count instead of data. That
> will give you the total # of records. Next, use
> WHEN-NEW-RECORD-INSTANCE that displays :SYSTEM.CURSOR_RECORD to
> give you the current record #.
>
> Remember, that DBMS_SQL is PL/SQL v2 and can not be stored in the form.
> The program unit will have to be stored in the database.
>

So why use it? Just use a cursor in the PRE-QUERY with the same WHERE clause as the block, returning a count. We do this both in that case, and in the case where we require a total value to be displayed, before all records have been read.

-- 
The above posting represents the personal opinions of the author and
is not to be taken as official (or unofficial) policy or opinions of 
his employer.

Alex Heney, Living in the Global Village.
Received on Mon Apr 21 1997 - 00:00:00 CEST

Original text of this message