Home » Developer & Programmer » Forms » How to avoid service call to database when populating labels at runtime ?
How to avoid service call to database when populating labels at runtime ? [message #190495] Thu, 31 August 2006 01:37 Go to next message
amul
Messages: 252
Registered: April 2001
Location: Chennai
Senior Member
Hi All,

I am working on forms 10g(version 10.1.2.0.2 ) with Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 on windows 2000 platform.

I am populating labels for all items(textboxes,radio buttons etc) at run time in a form by making a call to the database and populate this labels.my requirement is to avoid the service calls to the database,when invoking a form for the second time in a session.

The following illustration will explain.

From tree menu I invoke a form by name country_master,I will make a service call to the database and populate the labels in that form dynamically,I will do some manipulation on that form and come back to tree menu,then I invoke a form by name currency_master since this form is called for the first time,I am allowed to make a service call to the database to populate the lables in that form,once again I come back to tree menu.Now,If I invoke the country_master from tree menu,I have to populate the labels dynamically without making any service call to the database.

To summerise,I am allowed to make a call to database per form one time in a session,if I am going to invoke the same form again in the same session,I should not make a service call,but populate the labels.

Awaiting suggestions.

Regards
Mohan
Re: How to avoid service call to database when populating labels at runtime ? [message #191756 is a reply to message #190495] Fri, 08 September 2006 00:58 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Sounds as though you are going to have to populate some sort of local storage. Could you create 'globals' with a name built of 'form_block_item'?

Each time you enter a form you traverse your form (first block to last block, first item to last item), do a 'def' to see if the 'global' has been populated, if it has been populated, use that value, otherwise get the value from the database, populate the 'global', and then use it.

Others may have other ideas, like using an array, but I think the arrays live in the 'sga' of the database. I can't remember exactly.

David
Re: How to avoid service call to database when populating labels at runtime ? [message #193874 is a reply to message #190495] Tue, 19 September 2006 15:31 Go to previous message
Kevin Meade
Messages: 2101
Registered: December 1999
Location: Connecticut USA
Senior Member
try one of these (I have not tried them but then again this is you need eh..)

1) populate record_groups and share these between the forms
2) create a forms package with arrays and then share these

The hope is that one or both of these methods creates memory strucures that a commonly accessible too all open forms in a session. I seem to recall there was a way to share record_groups between forms either by passing, or as "global" structures.

3) populate a local file on the local client (ugh!) and read this.

Good luck. Kevin
Previous Topic: Changing FORMS_PATH
Next Topic: forms to xml
Goto Forum:
  


Current Time: Thu Dec 08 10:40:41 CST 2016

Total time taken to generate the page: 0.10013 seconds