11 Replies Latest reply on Sep 26, 2013 3:52 PM by V Rickert

    'Current version of database has changed since...' Error

    V Rickert

      I have now uploaded my application to APEX.ORACLE.COM and my workspace is PSGCA and I am having issues with page 310 - Invoice Detail.  How do I get the APEX.ORACLE.COM gurus to look over the page?  I am having a consistent problem with the Detail portion of this Master/Detail page.  Specifically, if I add data or update data to the Master section, no problems.  It is when I need to update data on the detail section that my problems start!  If I initially add the row, no problem.  If I add information to a null field, no problem.  The problem occurs when I want to change HOURS/DAYS and  EXPENSES.  It will take the initial value but if I want to change then I get the error  "Current version of database has change since..."

      Any insight into this error would be greatly appreciated!!


      DO you guys need for me to add the table definitions and sample data.  In the past, I was told this was not necessary; that all you needed was the page.

      Is that correct?

      Should I add table definitions and data?

        • 1. Re: 'Current version of database has changed since...' Error
          Paul Broughton

          Hi, It would certainly be helpful to able to mimic what you are trying to achieve in your own environment on apex.oracle.com so adding the table definitions and data would be useful.  You will also need to confirm your Username and Password for the PSGCA workspace so people are able to log in.





          • 2. Re: 'Current version of database has changed since...' Error



            Seems our posts in https://forums.oracle.com/thread/227579  are removed, guess that the thread was too old..


            Anyway, I had this 'Current version of data..' error in my app. after I upgraded to apex 4.2.2 but only in Internet Explorer.

            I found that removing a custom plugin I had on that page solved my problem.

            I'll have to check with the developer of that plug-in, so apparently it's not a generic problem for 4.2.2

            • 3. Re: 'Current version of database has changed since...' Error
              Tom Petrus

              What Paul said. If you upload something and want to share it with us, make sure that you pass us a valid unlocked account with developer rights, and mention your workspace name.

              Also please take note if you are using plugins or ANY form of custom javascript (script tags, code on the page level, file inclusions, code in template) and make mention of it. Are there dynamic actions?

              (in regard to javascript: If you really don't know then you can import your app to apex.oracle.com in its whole - if you can do that. If you can't then you'll need to double check, and the best place to do so is locally, by running your page and then looking at the source and see if there is anything not standard. )

              Are there custom processes being run? If yes, are they run before the multi-row processing?

              Another way to check is to simply create a new application, and then create a new master-detail form, and only using a standard theme with no customizations (no custom template, no custom code. Just a plain silly bog standard wizard generated page). Still have issues then?


              Edit: I suppose this hangs together with https://forums.oracle.com/thread/2578165

              It seems like your page has a bit of extra things going on. That is fine, but if you decide to upload your page make sure we have all the pieces, and indeed as Paul said, if might be good to have the required objects so we can run the page. It shouldn't be too hard to get 2 table structures over, and put some records in (a couple are fine). Templates and such may still be good to check if they have been customized though!

              • 4. Re: 'Current version of database has changed since...' Error
                V Rickert

                I have now uploaded and created the tables and imported seed data into those tables for my system called ' I and I '.  I created a sample Purchase Order through the PO menu item and a sample Invoice through the Invoice menu item.  The Invoice detail is what is causing the problem.  I was able to create Invoice 'ABC123' and add a line of Invoice Detail.  On the same line of detail, I was able to update the 'Service Begin' field multiple times as well as the Hours/Days field.  After that, I was able to update Expenses from null to .2 without a problem.  BUT when I wanted to update Expenses from .2 to 0, then I get the 'Current version of database has changed...' and it is now locked.  You have to delete the record and recreate it in order to change the fields to the correct values.

                I have two dynamic actions on the page.

                I have two custom processes that occur AFTER ApplyMRU.
                There is no custom javascript on the page.

                The workspace is PSGCA.

                The login for the page is Valerie.Belcher@Williams.com

                The password is Raymond1909.

                Once you select the application I and I and run it, you will have to log in.  Your id is guru and your password is guru

                Once you log in, go directly to Invoice page by selecting Invoice from the menu options.

                Select ABC123 and go to the Invoice Detail screen (page 310).


                Thanks in advance for your help!!   

                • 5. Re: 'Current version of database has changed since...' Error
                  Tom Petrus

                  For some reason I could narrow it down to the format mask on the expenses column, which was


                  When I changed it to


                  everything magically started working.


                  For people wondering about PR:



                  Returns negative value in <angle brackets>.

                  Returns positive value with a leading and trailing blank.

                  Restriction: The PR format element can appear only in the last position of a number format model.

                  Docs: http://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements004.htm


                  I'm just not sure why this particular mask causes it. Since checksums are generated I ran this sql to take a guess:

                  DBMS_OBFUSCATION_TOOLKIT.md5 (input => UTL_RAW.cast_to_raw(exp1)) md5_val1,
                  DBMS_OBFUSCATION_TOOLKIT.md5 (input => UTL_RAW.cast_to_raw(exp2)) md5_val2,
                  DBMS_OBFUSCATION_TOOLKIT.md5 (input => UTL_RAW.cast_to_raw('1.00')) md5_val1_1,
                  DBMS_OBFUSCATION_TOOLKIT.md5 (input => UTL_RAW.cast_to_raw('1.00')) md5_val2_2
                  from (
                  expenses exp1,
                  to_char(expenses,'999G999G999G990D00PR') exp2
                  from invoice_details
                  ) a


                  which generates this output.


                  Still unsure, but maybe it's to do with how and when the checksums are generated?


                  Drawing a blank here - as you can see there is no guru, ace or oracle badge under my name so I'm safe

                  I made changes to page 310, made backup to 24 but probably doesn't matter since your app is local. Probably safe to change your credentials and/or remove your application.

                  awesome effort on the example. That helps us help you a lot better!

                  • 6. Re: 'Current version of database has changed since...' Error
                    V Rickert

                    WOW!  Thank you!  That was it!  Good grief!  So just to educate me, why would a format like that be provided for a number if it could possibly cause this error?  I would never have found this without your observant eyes!  THANK YOU SO MUCH, Mr. GURU! 

                    • 7. Re: 'Current version of database has changed since...' Error
                      Tom Petrus

                      Well, the format works fine in sql and causes no harm in reports, but I don't fully understand why apex determines there has been a change of data because of this mask. I know there is a checksum generated during render and another during submit and how they are compared to determine if data has changed between those 2 points. But there must be some nuance to it here for some reason - wish I knew.

                      • 8. Re: 'Current version of database has changed since...' Error
                        Howard (... in Training)



                        Were any of the numbers to be displayed/saved negative?  Since negative number cause angle brackets <> to display -- and HTML loves angle brackets, it makes my wonder if that could cause a problem in a roundabout way.   Or, just the fact that they are in the definition even if never used -- no negative numbers -- might lead to the problem.




                        • 9. Re: 'Current version of database has changed since...' Error
                          Tom Petrus

                          Hi Howard,


                          While it would seem most likely to occur with negative numbers, in the example of VRickert there were no negative numbers. I only tried with positive ones even because I know the brackets may cause further issue - but no joy. That is part of why I don't see what kind of goes 'wrong' here: on a positive number it looks like an actual positive number with no fluff around it.

                          • 10. Re: 'Current version of database has changed since...' Error
                            Howard (... in Training)



                              But doesn't there have to be code somewhere with angle brackets in it -- in case the number comes out negative?  Could whatever wraps that code be messing/messed up?



                            • 11. Re: 'Current version of database has changed since...' Error
                              V Rickert

                              You don't need angle brackets to show negatives.  Oracle will put a '-' sign for negative numbers with the regular formats.  'PR' format will not work.  I had no other code, just that format specification.  It was a weird error.