Home » Developer & Programmer » Forms » Need to get the total no. of record that are queried in a block
icon5.gif  Need to get the total no. of record that are queried in a block [message #211509] Fri, 29 December 2006 01:13 Go to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
hiiiiiiiiiiiiiiii,

I want to hold total number of records that are populated in a block, but I dont want to do this through POST-QUERY trigger.

I mean is there any other way of doing this like is there any form property that can tell me how many records are populated in the block.

I think there should be a way b/c if you see at the bottom in the console bar of any form, developer shows the number of current record and the number of total record for example like this 4/8. Where 4 is your current record and 8 is the total number of populated record.

If there is a get property think available then I dont have to maintain the number of current record and number of total record if there is a new insert or a delete. I just have to get the value with this property and each current record which being navigated by the user and show it to him/her.

Waiting for a response

Regards,
Azam Khan
Re: Need to get the total no. of record that are queried in a block [message #211513 is a reply to message #211509] Fri, 29 December 2006 01:24 Go to previous messageGo to next message
kamran.it
Messages: 265
Registered: September 2005
Location: Karachi
Senior Member
Assalam aliakum

Dear Azam y

You can define this situation in query so plz create a query and use count function your problem will solve

Kamran Ahmed
icon11.gif  Re: Need to get the total no. of record that are queried in a block [message #211516 is a reply to message #211513] Fri, 29 December 2006 01:36 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
Sorry Mr. Kamran Ahmed this is not a solution... suppose i take you suggestion ok fine... now I open the form and perform execute query and also get the number of records by this through a select count query right now on form suppose I delete a record than the number of count got invalid ... or if i create a new record then I have to add 1 to that number of counts. Keep in mind that I haven't issed commit yet so select cuont is no longer useful for me now.

But thanks alot for your quick reply Kamran.

Regards,
Azam Khan
Re: Need to get the total no. of record that are queried in a block [message #211526 is a reply to message #211509] Fri, 29 December 2006 03:24 Go to previous messageGo to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

Then read the block from first to last record.
Re: Need to get the total no. of record that are queried in a block [message #212219 is a reply to message #211509] Thu, 04 January 2007 04:51 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
What is wrong with the numbers that are displayed by the default behaviour of Oracle Forms?

David
icon11.gif  Re: Need to get the total no. of record that are queried in a block [message #213499 is a reply to message #211509] Thu, 11 January 2007 00:35 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
Dear David,

There is nothink wrong with the numbers that are displayed by the default behaviour of Oracle Forms but I want to supress the console bar so in that case this message will be supressed.

This there any ways to store form's these value in a variable?

Regards,
Azam Khan
Re: Need to get the total no. of record that are queried in a block [message #213673 is a reply to message #213499] Thu, 11 January 2007 16:23 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I recommend that you read the reference manual concerning the 'count_query' command. If you execute it AFTER you do an 'execute_query' then ALL records will be retreived. If you do it in the 'pre-query' trigger then a 'row count' will be retrieved from the database. You store this value. You have access to the 'row number', now all you have to do is manually increment and decrement the number of records in your stored value when you do the inserts and deletes.

David
icon10.gif  Re: Need to get the total no. of record that are queried in a block [message #214091 is a reply to message #213673] Sun, 14 January 2007 23:08 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
Dear David,

What you suggested is what I m currently doing but what I was thinking of is that is there any way of getting the form's console bar's total record value. Because if this can happen then I dont have to mannually handle the record count when a record is inserted or deleted.
Re: Need to get the total no. of record that are queried in a block [message #214341 is a reply to message #214091] Mon, 15 January 2007 23:44 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
If you find the answer please let us know.

David
Re: Need to get the total no. of record that are queried in a block [message #214344 is a reply to message #214341] Mon, 15 January 2007 23:48 Go to previous message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
Cool ok David
Previous Topic: Error FRM-41213
Next Topic: Need to Clear a Block without Navigating it
Goto Forum:
  


Current Time: Mon Mar 10 03:06:25 CDT 2025