1. Deepak Sharma
  2. Elevate Discussion
  3. Saturday, 13 April 2024 09:20 AM UTC

Adding a new record in datawindow from script on a command button and calling update command in itemchanged event of datawindow after editing record in datawindow is popping Datawindow update error in PowerServer 2022.

Script runs fine in PowerBuilder 2022 environment but after deploying on PowerServer 2022 pops error on calling update command in itemchanged event of datawindow.

 

 

Deepak Sharma Accepted Answer Pending Moderation
  1. Thursday, 6 June 2024 07:15 AM UTC
  2. Elevate Discussion
  3. # 1

I agree with your comments but why this works in PowerBuilder 2022 without any error but not in Power Server 2022.

Comment
  1. John Fauss
  2. Thursday, 6 June 2024 13:40 PM UTC
In a PowerServer app, all database interactions have been converted to utilize REST API calls. This is very different from the way a PowerBuilder client/server application communicates with a database. You cannot equate the two. Here is a link that describes this distinction:

https://docs.appeon.com/ps2022r3/Connection_differences.html
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Saturday, 13 April 2024 16:02 PM UTC
  2. Elevate Discussion
  3. # 2

Hi Deepak;

  FWIW: you should never do the Update() command in any DC event. The update command can fire various DC events again as it also forces an AcceptText() command during the start of the update sequence. So the proper way would be to POST a User Event as that let's the DC event complete. Then in the UE, perform the Update().  HTH 

Regards ... Chris 

Comment
  1. Deepak Sharma
  2. Saturday, 13 April 2024 19:22 PM UTC
Thanks for your response.

How can I get more details (any links) on these practices as script working in PB 2022 is giving Datawindow Error in PS 2022.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Sunday, 14 April 2024 03:58 AM UTC
FYI: these type of things were taught in the "Mastering DataWindows" and "Exploiting DataWindows" courses. Unfortunately, these courses no longer exist. However, as a former CPI (certified PowerSoft instructor) and CSI (certified Sybase instructor), I used to teach these courses. These courses had a wealth of material like this. ;-)
  1. Helpful 1
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.