1. Amulya Kashyap
  2. PowerServer
  3. Wednesday, 28 February 2024 10:22 AM UTC

Hi Team,

We are using Appeon Powerbuilder CloudPro Edition.

image

 

We are updating the SQL UPDATE query based on a condition in DW SQLPreview event. The UPDATE query submitted to DBMS is fetched from SQLSyntax of SQLPreview event and is then modified and set as the Syntax to DW.

Example code:

IF col_1.value  <> 'EXAMPLE' THEN    
  ls_update_sql = sqlsyntax
  ll_pos_start = POS(ls_update_sql, "col_1.Name")
  IF ll_pos_start > 0 THEN 
    ll_pos_end =ll_pos_start + LEN("col_1.Name = ") + LEN(STRING(col_1.value))
    ls_update_sql = LEFT(ls_update_sql, ll_pos_start - 1) + "col_1.Name  = " + String('EXAMPLE') + RIGHT(ls_update_sql, LEN(ls_update_sql) -                     ll_pos_end + 1)
  END IF
  THIS.SetSQlPreview(ls_update_sql)
END IF

Since, SQLPreview(SQLSyntax) is not supported, please let us know the way to get the UPDATE statement submitted to DBMS.

David Xiong @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 23 October 2024 09:52 AM UTC
  2. PowerServer
  3. # 1

Hi Amulya,

We recently released PowerServer 2025 Beta (Build 3398). PowerServer now fully supports the Datawindow SQLPreview event. We invite you to test this enhancement and provide your valuable feedback. For instructions on how to use it, please refer to the "Support SQLPreview event" section in the built-in PowerServer new features documentation.

Below is the download link for the PowerBuilder 2025 installer.

PowerBuilder:
https://file.appeon.com/download/Installer/PowerBuilder/Beta/PowerBuilderInstaller_bootstrapper.exe

Note:
We recommend using a virtual machine for testing to avoid any interference with your development environment.

Thanks for your continued support!

Regards,
David

Comment
There are no comments made yet.
Amulya Kashyap Accepted Answer Pending Moderation
  1. Monday, 4 March 2024 11:56 AM UTC
  2. PowerServer
  3. # 2

Hi, 

Please respond to the above query.

Comment
  1. John Fauss
  2. Monday, 4 March 2024 14:15 PM UTC
Please read David Xiong's earlier response dated Friday, 1 March 2024 06:25 AM UTC.
  1. Helpful
  1. Amulya Kashyap
  2. Monday, 4 March 2024 14:29 PM UTC
Agreed. Please let us know if we have any alternate for SQLPreview where we can fetch the SQL statement submitted to DBMS.
  1. Helpful
There are no comments made yet.
Amulya Kashyap Accepted Answer Pending Moderation
  1. Friday, 1 March 2024 06:47 AM UTC
  2. PowerServer
  3. # 3

Hi,

Please let us know the way to get the UPDATE statement submitted to DBMS. We need to modify the UPDATE statement before updating the DW.

 

Thanks!

Comment
There are no comments made yet.
David Xiong @Appeon Accepted Answer Pending Moderation
  1. Friday, 1 March 2024 06:25 AM UTC
  2. PowerServer
  3. # 4

Hi Amulya,

 

PowerServer 2022 R3 doesn’t support SQLPreview. The plan is to support it in PowerServer 2025.

 

Regards,
David

Comment
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Thursday, 29 February 2024 03:51 AM UTC
  2. PowerServer
  3. # 5

You say SQLPreview unsupported.  So do you mean you are deploying this as a PowerServer project type?

Comment
  1. Amulya Kashyap
  2. Friday, 1 March 2024 05:09 AM UTC
Yes
  1. Helpful
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.