Re: Forms 4.5 question

From: Dan McSwigan <_at_ix.netcom.com>
Date: 1997/07/16
Message-ID: <5qisv8$r9t_at_dfw-ixnews8.ix.netcom.com>#1/1


Try this:

Create a function which returns the value of the select that uses the built in count_query.
Depending on your logic (when you load up the query fields) call it before or after your query.

It should look something like this:

FUNCTION count_query_hits
RETURN varchar2
IS

	prv_sys_msg_lev varchar2(2);
	cnt_qry varchar2(10);
BEGIN
	prv_sys_msg_lev := :SYSTEM.MESSAGE_LEVEL;
	:SYSTEM.MESSAGE_LEVEL :='25';
 count_query;
	:SYSTEM.MESSAGE_LEVEL := prv_sys_msg_lev;
	cnt_qry := translate(MESSAGE_TEXT, 'Query will retrive records. ',' ');
	RETURN(cnt_qry);

END; Hope this helps.

Later, Dan

hurd carol wrote:
>
> I want to display something like "record 1 of 336" immediately after a query.
> I searched everything I could think of to find some sort of system variable
> that already has the last record number, but couldn't find anything. So, I
> came up with two possible solutions. First, to use create a dynamic query
> by concatenating "select count(*)" with the rest of the query that Forms
> just executed, using Forms_DDL. Since that won't return a value, I know
> I have to use a stored procedure. Unfortunately, right now I don't have
> permission to create a procedure. (I'm working on that.) So, that leaves
> me with my second idea, which is to go to the last record, store that record
> number in a variable, and then go to the first record. This can be PAINFULLY
> slow, so I'm looking for other solutions. I keep thinking that it shouldn't
> be this complicated... does anyone have other suggestions? Did I miss some
> helpful system variable? Has anyone used Forms_DDL with a procedure, and
> was it fast?
>
> Thanks,
> Carol Chandler
Received on Wed Jul 16 1997 - 00:00:00 CEST

Original text of this message