Home » Developer & Programmer » Forms » Forms not hitting database (10G)
Forms not hitting database [message #396682] Tue, 07 April 2009 10:52 Go to next message
nastyjillu
Messages: 211
Registered: February 2009
Senior Member
hi. my issue is very difficult to explain. even though iam trying.
attached is the screenshots. i placed all block images on one image with block names.

issue is below:

i have a multi row block called block "A". it has buttons in each row.

there is another block called "B", its multi row block and the fields are LOV fields.
when i open the LOV and select 3 rows then 3 rows in block "B" will be populated.

now i close that window , and i give values in block "A" in first record and click
on the "button" in first record. then it opens a window with block "C".
this block "C" displays the 3 records which i gave in block "B".

this is fine till now.

now the problem is, when i open block "B" again and give more 3 rows through LOV then the
total records in block "B" are 6 now.

now when i click on button in first row of block "A" it will open block "C" window and should
display 6 records,but its showing only 3 records. lets assume that the 3 records which were added
are not inserted into database table.

but when i create new record in block "B" which is second row and click on the button in this second
row,then it opens block "C" and displays 6 records. which is fine.

but when i again click on the button in the first row it still shows 3 records only. but it should show
6 records because there are 6 records in the block "B" table.

why is it not showing 6 records??

suppose if i add more 3 records in block "B" ,now total records in block "B" are 9.
now if i click on button in first row it should open block "C" and display 9 records but its displaying
only 3 records.

if i click on button on second row it should display 9 records but its displaying only 6 records.

if i create 3rd record in block "A" and click on the button in 3rd row, it displays 9 records now.

why is it acting wierd?? is form saving the values and showing the same values at buttons on row 1, 2 and 3??

is it not hitting database??

what should i do to show same number of records which are in block "C" when i click on any button??

there is a code in post-insert trigger of block "A" which is inserting values in block "C". its given below:


BEGIN
  INSERT INTO block_C_table(
           id, litm, unit, litm_id)
    SELECT :block_A.id, w.litm, li.unit, li.litm_id
      FROM litm_v                li,
           w_elements  w
     WHERE w.id = :block_A.id
       AND li.id = w.litm_id;
                    
EXCEPTION
	   WHEN OTHERS THEN
          exception('POST-INSERT on block A');
END;


i tried to explain as far as i can. please analyse the issue and help me in solving
  • Attachment: blocks.JPG
    (Size: 78.54KB, Downloaded 542 times)
Re: Forms not hitting database [message #396786 is a reply to message #396682] Wed, 08 April 2009 01:19 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Is there any kind of master-detail relationship between these blocks? It appears that Forms correctly does its job (as form's behaviour is consistent). Perhaps you should review the way you've created relationship(s) and, possibly, omit one (or more) conditions?
Re: Forms not hitting database [message #397063 is a reply to message #396786] Wed, 08 April 2009 14:23 Go to previous messageGo to next message
nastyjillu
Messages: 211
Registered: February 2009
Senior Member
i solved the issue.

i created a 'on insert for each row' trigger on table of block B which will insert values in table of block C. thus block C is populated with block B values


thanks
jillu
Re: Forms not hitting database [message #398025 is a reply to message #397063] Tue, 14 April 2009 23:17 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I think that LF is right in that you should go back to the beginning and let Forms build your 'relations' for you.

David
Previous Topic: how to disable save button option on pdf
Next Topic: where can i install forms and reports 6i
Goto Forum:
  


Current Time: Tue Dec 03 08:29:06 CST 2024