Re: Forms 4.5/Query hits before executing query.

From: Thomas B. Cox <tcox_at_netcom.com>
Date: 1995/05/09
Message-ID: <tcoxD8BsBx.4GF_at_netcom.com>#1/1


In article <3oe1nb$5lm_at_ionews.ionet.net>, Lee Mayhew <lmayhew_at_ionet.net> wrote:

>I am developing a form that needs to count the number of records that
>will be queried before it does the query and display it after the query
>is finished, so I can return a message like....
 

>1 of 22 owners retrieved.
 

>I realize I can get this number by doing a:
 

>hits := GET_BLOCK_PROPERY( block, QUERY_HITS );
 

>but I can't figure out where to place this in my form to get the
>correct number of hits. If I place it before the execute query, hits=0,
>after the query, hits=1.
 

>Any ideas or suggestions? Thanks in advance,

	Try doing it as the last statement in your block's PRE-QUERY
	trigger. ;-)

	(That's the same place you'd populate fields with values
	that you wanted to include in the query criteria.  For
	example, if you have a pre-query trigger that sets field
	FOO to have value BAR, then you end up with the text
	WHERE foo = 'BAR' as part of the query.)

	I have not tested the counting of query hits, however.

	-Tom
-- 
Thomas B. Cox   tcox_at_netcom.com
Author of _Oracle Workgroup Server Handbook_, ISBN 0-07-881186-4
   See:   http://www.oracle.com/info/magazine/orapress.html
Received on Tue May 09 1995 - 00:00:00 CEST

Original text of this message