Displaying the total number of records .... [message #81349] |
Fri, 07 February 2003 09:08 |
neel
Messages: 12 Registered: November 2001
|
Junior Member |
|
|
Hi,
I am developing a form on Forms 6 and i want to display the total number of records found by a query.
Once i am in enter-query mode, i go to the empno column and type 00% and the key-Exeqry fires which executes the query but won't give me the total no. of records.
Declare
tot number(8);
Begin
select count(*) into tot from emp
where empno like ':&empno';
message('Number of records found:' ||(tot)); pause;
execute_query;
End;
I can do a next_record and move on to see rest of the records, but i want the user to know that there are total of 10 records before seeing the first one. Please let me know if anyone can help.
Thanks !!!
|
|
|
Re: Displaying the total number of records .... [message #81354 is a reply to message #81349] |
Sat, 08 February 2003 05:22 |
Alamelu
Messages: 2 Registered: February 2003
|
Junior Member |
|
|
hi Neel!!
1.u can get the Query hit for the block which will give u the number of records queried.
i.e
exceute_query;
count := get_block_property('block_name',query_hits);
message('number of record queried '||count);
this will give u the result..
2. In the block property, set the property "query_allowed_records" to "Yes"
When the queried record are displayed on the status bar u will current record/total records queried..
i.e if the total record queried is 100 and the cursor is on the first record it will display 1/100( 1 of 100 record).
All the best.
Regards.
|
|
|