4 Replies Latest reply: Mar 5, 2014 8:33 AM by CraigB RSS

    Refreshing views in forms

    user1861271

      Hi,

       

      I'm facing a pretty strange behavior from oracle forms : after updating a column in my table, I try to retrieve its value from a view based on this table, but it seems like forms (or oracle DB) just ignore the update even though I've made a commit after my update, and gives me the value before update.

      It all happens at runtime, because when I consult the view in my DB the value is of course updated.

       

      Any clues?

        • 1. Re: Refreshing views in forms
          CraigB

          Could you show us the code you are using to update your underlying view table?  Just off the top of my head, my guess is that there is an error during the update, but this is just a guess.

           

          Also, it would be helpful to know your Forms version, how your application is deployed, are you using a standard Forms data block or a non-base table block and writing the DML in code versus letting Forms handle the DML.  Please include any other information you feel might help us understand your situation and offer you possible solutions.

           

          Craig...

          • 2. Re: Refreshing views in forms
            user1861271

            Hi craig,

             

            I update the value of the column like that :

            update MY_TABLE set MY_COLUMN = 'value' where <condition>;

            commit;

             

            Strange think is that :

            - select my_column into my_variable from my_table where <condition> ==> value updated

            - :MY_BLOCK.MY_COLUMN ==> value not updated (MY_BLOCK is based on a view based on my table).

             

             

            Forms version : 10.1.2.0.2

            • 3. Re: Refreshing views in forms
              InoL

              > value not updated (MY_BLOCK is based on a view based on my table).

               

              Assuming that your view is correct, did you do an execute_query on MY_BLOCK after the update? If not, the new value will not be shown in your block. You have to re-query your block to see the result.

              • 4. Re: Refreshing views in forms
                CraigB

                I agree with InoL, you will need to re-query your block after the update to see the change.


                Craig...