6 Replies Latest reply: Sep 20, 2013 9:39 PM by 1011009 RSS

    Application level changes if a table definition changes

    1011009

      Hi,

       

      I have developed an application using Oracle Apex. Application has around 20+ underlying tables. If a column is added or dropped from a table sepcified in the application then how to make changes appropriately at application level instead of redesigning the application completely from scratch ?

       

      Thanks,

      Anil

        • 1. Re: Application level changes if a table definition changes
          Paul Broughton

          Hi Anil,

           

          One way to approach the removed columns is to run the APEX Advisor regularly -  14.2 Running Advisor to Check Application Integrity

           

           

          This will capture any Invalid DML or SQL in the application and take you to the invalid part to resolve the issue.

           

          As far as when new columns are added you will need to go into the pages in the application that the tables are referenced on and alter the SQL of Reports and add new Page Items for the new columns if they are required in your forms and reports or anywhere else in the application.

           

           

          This will of course be much quicker than recreating the whole application.

           

           

          Thanks

           

          Paul

          • 2. Re: Application level changes if a table definition changes
            1011009

            Hi Paul,

             

            Thanks for replying. I added a column to a table used in the application & now want to have the new column reflected in the application, but do not see any option for "Alter the SQL ".

             

            Thanks in advance for your help.

             

            Thanks & Regards,

            Anil

            • 3. Re: Application level changes if a table definition changes
              Mike Kutz

              Anil,

              Paul is referring to the "Report Source" parameter for the "Report Definition".

              You have to manually change/alter the SQL so that it will work with the new table design.

              (there are no Wizards for this.)

               

              Make sure you click 'apply changes'.

              APEX should then ask you to verify that you added/removed some columns (at least, for Interactive Reports)

              hint:  your new columns will be 'hidden' at first.  just  click "action->select columns.." to make them show up.

              • 4. Re: Application level changes if a table definition changes
                1011009

                Thanks MikeKutz/Paul, with your help I am able to get nearer to my requirement fullfillment. I was  able to edit source  code for  page type "Interactive Report"  & now I am getting new column displayed in report.

                 

                Another page type "DML Form" is not displaying newly added column .  Can you please guide me on this ?  Thanks in advance for help.

                 

                Thanks & Regards,

                Anil

                 

                 

                • 5. Re: Application level changes if a table definition changes
                  Mike Kutz

                  Anil,
                  These "DML Form" pages, IR report pages, etc.,etc. are all created with a Wizard.

                  Think of the "Create Page Wizards" as "code that writes code".

                  Once the code (your APEX pages) is written, any changes that need to be made must be done manually.

                   

                  This applies to every page that touches that table.

                  I don't know what other page types you have created, but the concept remains the same.

                   

                  Go to the page.  Make the changes.  Test.  Done.

                   

                  You have already ran across what needs to be changed in the "IR" type pages.

                  Now, you need to work on the "DML Form" pages.

                   

                  I am assuming these pages have "Automatic Row Fetch" and "Automatic DML" (I don't use the Auto-DML)

                  That will make it easier for you as you just need to add an Item to the page and point it to the new column name.

                   

                  Go to that page and Create/add the appropriate Item type.

                  On the "Source" settings, you want the "Source Type" to be "Database Column".

                  Fill in the correct name for the new column IN ALL CAPS.

                   

                  Again, you will need to repeat this process for each page that is using the new column in some fashion.

                   

                  MK

                  • 6. Re: Application level changes if a table definition changes
                    1011009

                    Thanks MK, I'm all set for now with your help. I was able to make "DML Form"  page working as well with addition of new column by using Create/add option.

                     

                    Thanks a lot ..

                     

                    Thanks & Regards,

                    Anil