Re: Retrieving Count_Query Results into a Field

From: Michael Nolan <nolan_at_helios.unl.edu>
Date: 2 Nov 1993 23:44:33 GMT
Message-ID: <2b6rd1$a2a_at_crcnis1.unl.edu>


bcazzell_at_mbvlab.wpafb.af.mil (Beverly S. Cazzell) writes:

>In SQL*Forms 3.0, is there a way to put the number of records a
>query will retrieve (COUNT_QUERY results) into a non-base table
>field in a form? (Forms 3.0 will not allow a COUNT_QUERY call from
>a Pre-Query trigger.)

There are at least two ways to do this. One is to navigate to the last record and then check the :system.cursor_record variable which will contain the total number of records in the block. This works well unless there are a large number of records that hit for the query.

Bulletin 100828.629 details an interesting alternative, wherein you trap the 'Query will retrieve nnnnn records message', which is message FRM-40355, and then process it with an ON-MESSAGE trigger.

It does place some restrictions on what types of queries you can permit, and for full details I would refer you to that bulletin.

Note: These bulletins are available on the Oracle RTSS system, which should be available to US customers who have a support contract with Oracle. International users will have to check with their local Oracle office.

The bulletins for Forms are also in the library of the DBMS RoundTable on GEnie, and (I think) in the Oracle Forum on CompuServe. I don't have permission to e-mail them to people or post them to the Internet, so please don't ask. You might try your local Oracle User Group, too.

---
Michael Nolan, Sysop for the DBMS RoundTable on GEnie
nolan_at_notes.tssi.com, dbms_at_genie.geis.com
(posted from nolan_at_helios.unl.edu)
Received on Wed Nov 03 1993 - 00:44:33 CET

Original text of this message