1. Anna Uden
  2. PowerBuilder
  3. Wednesday, 7 July 2021 18:53 PM UTC

We are currently working to upgrade from PowerBuilder 12.5.1 Build 4015 to Appeon 2019 R3 Build 2703

We have a datawindow that does a straight update to a specific table using the datawindow's update properties.  We also have columns that are NOT part of the specific table but are editable by the user.  The save code manually handles saving data for those columns, and then issues the datawindow's Update function for the rest.

If the user only changes data for the columns not part of the specific table, that update occurs fine in both 12.5 and 2019. 

When the update function is called in 12.5, while debugging it jumps to the updateend event and works fine because it found nothing to update.  

However in 2019, the update function returns a -1 and does NOT fire the dberror event or error event on the non-visual datastore used to do the updates.

Is this how it is suppose to work?  Am I going to have to code around this for 2019?

Anna Uden Accepted Answer Pending Moderation
  1. Wednesday, 7 July 2021 19:21 PM UTC
  2. PowerBuilder
  3. # 1

It was the update properties.  Thank you for steering me in the right direction!  Truly appreciate it!

Anna

Comment
  1. Armeen Mazda @Appeon
  2. Wednesday, 7 July 2021 19:28 PM UTC
Thanks for sharing the solution!
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 7 July 2021 19:30 PM UTC
That's "awesome" news Anna!
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 7 July 2021 19:11 PM UTC
  2. PowerBuilder
  3. # 2

Hi Anna;

   There should be no difference in the Update() command logic internally of how the DWO handles the DML for the changed column(s). The first thing that I would check is that the DWO in 12.5 and the DWO in PB2019R3 have the same Update Properties and Updatable Columns set. I would check that first. Any variance here could explain the different behaviour

   The other check could be to use the SQLPreview event on the DC/DS to see if the SQL generated in v12.5 is the same update SQL that you see generated in PB2019R3.

   Alternatively instead of the SQL Preview event, you could set an SQL Trace in the V12.5 and v2019R3 of the App and then see what is being updated in each version of the App. For example:

  • SQLCA.DBMS = "XXX"              // OLD
  • SQLCA.DBMS = "TRACE XXX"   // NEW

   You can also run the DWO in the DW Painter and in the "Preview" pane emulate the Retrieved and Updated data and then see if the "save Changes" on the DW Painter's toolbar works without error.

   Other considerations could also be newer / different DBMS, DB Client, DB Access method, etc between the V12.5 ans v2019R3 Apps.

HTH

Regards ... Chris

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.