1 Reply Latest reply on Nov 20, 2012 2:40 PM by MLBrown

    Unable to update non database blocks values to a table

      Hi All,

      In the form which i am developing , i have requirement like i will have a header section and a lines section(TAB Canvas) . 2 tables - headers_table, lines_table.

      header block is database block.(have columns header_id,rpr_nbr,and who_columns)

      I have say 5 tabs (each tab fields in different data block, like tab 1 - block 1, tab 2 - block 2....) Blocks are not database blocks. i have to save data in these tabs into "lines_table" as
      tab 1 as record 1 , tab 2 as record 2....,tab5 as record 5.

      when a new record is created and press save , 1 record is created in header_table , 5 records in lines_table.
      (wrote the procedure to save lines in 'ON_INSERT' Trigger of header_block)

      Problem is when i am updating the values of these tabs (lines section) . and pressing save ,the data is not saving to database(lines_table).
      (wrote update procedure for lines on 'ON_UPDATE' TRIGGER of header_block).

      When i change (update ) values of the fields in these tabs , how to identify the chances and how can i update these changes to 'lines_table'.

      Please suggest me .

      Durga Srinivas.
        • 1. Re: Unable to update non database blocks values to a table
          You probably need to redesign the form module because it sounds like a maintenance nightmare.

          You can create numerous blocks that reference the same table - so I would change your tab1 - block1, tab2 - block2, ... so that each block references the LINES_TABLE. You can then create master-detail relationships between the HEADERS_TABLE and each of the LINES_TABLE blocks. Oracle Forms will then handle the references for you and you will have no problems with inserting, updating, deleting. Once you have these in place you can remove your logic from the ON-INSERT and ON-UPDATE triggers... you would leave logic to populate sequences, creator ids/dates, etc...