Home » Developer & Programmer » Forms » Oracle forms (6i)
Oracle forms [message #485603] Thu, 09 December 2010 00:47 Go to next message
srirushi
Messages: 6
Registered: December 2010
Junior Member
Hi,

I have developed a new form.Something peculiar is happening for that form.

Let me list down the scenario

1)In the data base for the particular table my form is using, there are 1600 records.When i do a Query on Count Hits in the forms,it gives the same number.

2)However when i open the form ,i do not get some of the records.I found that on opening the form and making an Execute Query only those records that i have added through forms exist.

3) However,when i try to add a new record and do an Execute query again,i get all the records present in the database.

Please help me out
Re: Oracle forms [message #485607 is a reply to message #485603] Thu, 09 December 2010 00:58 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
2) It seems that datablock's WHERE clause is set to some value, so it doesn't retrieve all records. Did you set it in WHEN-NEW-FORM-INSTANCE trigger or do you have a PRE-QUERY trigger or any other PL/SQL program unit that uses SET_BLOCK_PROPERTY with its DEFAULT_WHERE or ONETIME_WHERE parameter?
Re: Oracle forms [message #485609 is a reply to message #485607] Thu, 09 December 2010 01:05 Go to previous messageGo to next message
srirushi
Messages: 6
Registered: December 2010
Junior Member
Hi,

I dont have any where clause in my When-New-Form_Instance or any pre-trigger.
This is my When-New-Form_Instance
Break;
Declare Dummy Number;
BEGIN
XStartup;
set_initial_window;
Initialisation_retr('1.0','2010/10/08');

default_value('','global.color_nm');
if :global.color_nm is not null then
set_forms_color(:global.color_nm);
end if;


EXECUTE_QUERY;
END;


SET_BLOCK_PROPERTY with its DEFAULT_WHERE or ONETIME_WHERE parameter-- I dont know where i can find this..Kindly let me know
Re: Oracle forms [message #485613 is a reply to message #485609] Thu, 09 December 2010 01:10 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What does "XStartup" do?
What does "Initialisation_retr" do?

In order to find anything within PL/SQL program units, go to "Edit" menu and "Find and Replace PL/SQL".
Re: Oracle forms [message #485615 is a reply to message #485613] Thu, 09 December 2010 01:57 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
Do you have any list items or radio groups in your datablock?
Re: Oracle forms [message #485616 is a reply to message #485615] Thu, 09 December 2010 02:04 Go to previous messageGo to next message
srirushi
Messages: 6
Registered: December 2010
Junior Member
Yes,

I do have 2 list items in my forms.But i cheked the query in my database.I am getting the same records.
Re: Oracle forms [message #485617 is a reply to message #485616] Thu, 09 December 2010 02:24 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
Say you have a list item that recognizes the values A, B and C. If you then query a record where the column the list item is mapped to has value other than one of those oracle forms will silently discard it.
However it won't check this when doing count hits so it'll tell you it'll get everything.
Check the values the list items recognize and the what values are found in the corresponding columns in the DB.
Re: Oracle forms [message #485665 is a reply to message #485617] Thu, 09 December 2010 06:17 Go to previous messageGo to next message
srirushi
Messages: 6
Registered: December 2010
Junior Member
Hi,

Thanks for your reply.But i tried doing everything u said.Its not working.

I think some issue is there with the trigger.Since on the firs execution the records are not getting retrieved.However when i do a "Enter Query" and try to insert,but end up doing Shift+F1 then delete then all the records are getting retrieved.Also when i am inserting a record and making a commit and doing an Execute Query my records are getting retrieved.

Please help me out as i am new to the forms and have tried all sort of solutions.
Re: Oracle forms [message #485674 is a reply to message #485665] Thu, 09 December 2010 07:48 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
srirushi wrote on Thu, 09 December 2010 12:17
Hi,

Thanks for your reply.But i tried doing everything u said.Its not working.

What exactly did you try?

srirushi wrote on Thu, 09 December 2010 12:17

I think some issue is there with the trigger.

The when-new-form-instance above? I doubt it. But if it is the issue is in one of the procedures called from the trigger so you'd have to show us the code for them.

srirushi wrote on Thu, 09 December 2010 12:17

However when i do a "Enter Query" and try to insert,but end up doing Shift+F1 then delete then all the records are getting retrieved.

You're going to have to explain that in more details.

srirushi wrote on Thu, 09 December 2010 12:17

Also when i am inserting a record and making a commit and doing an Execute Query my records are getting retrieved.

Your records or all records? I thought the problem was pre-existing records weren't getting retrieved? In which case that proves nothing.

Double check if you have any of the following triggers:
PRE-QUERY
POST-QUERY
KEY-ENTQRY
KEY-EXEQRY

I also suggest you make use of get_block_property(<block_name>, last_query) to find out exactly what query the form issued to the DB
Re: Oracle forms [message #485815 is a reply to message #485674] Fri, 10 December 2010 03:38 Go to previous message
srirushi
Messages: 6
Registered: December 2010
Junior Member
Hi,

Thanks for all your suggestions.The issue is solved.There were two fields,that was made as "Required=NO".And it worked..
Previous Topic: populate pl sql table
Next Topic: Range of Values
Goto Forum:
  


Current Time: Thu Sep 19 00:24:45 CDT 2024