Re: Query Hits Question

From: Joseph Strano <stranoj.dulcian_at_postoffice.worldnet.att.net>
Date: 1997/04/19
Message-ID: <33599418.7E57_at_postoffice.worldnet.att.net>#1/1


[Quoted] 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.

Joe Strano
Dulcian, Inc.


Wayne Marsh wrote:
>
> Perhaps someone can help me on this one. I am setting a query
> programmatically in a Form45 application. I have no problem setting the
> DEFAULT_WHERE property in a Pre-Query trigger. I would like to display the
> number of records returned by the query with the current record number as
> the user scrolls through the block populated by the query (ie record x of
> y). I have tried to use the QUERY_HITS block property but with no success.
> My solution has been to enter the block, go to the last record to get the
> record number for the total and then back to the first record but this
> seems rather cludgy. Does anyone know if the QUERY_HITS property can be
> used instead and how?
> --
> Wayne Marsh
> University of Guelph
Received on Sat Apr 19 1997 - 00:00:00 CEST

Original text of this message