1. Rajesh Kanna
  2. PowerBuilder
  3. Tuesday, 16 July 2024 07:43 AM UTC

Hi,

 

I added below script in DW's sqlpreview event. but getting following error message. Using PB2022 R3 version.

"Unsupported(PowerServer) C0237: previewfunctionupdate as the request argument of SQL Preview (Suggestion: Do not use)"

If request = PreviewFunctionUpdate! then
  If sqltype = PreviewDelete! then

   ll_cust_id = GetItemNumber(row, 'customer_id', Delete!, FALSE)
   ll_billing_proj_id = GetItemNumber(row, 'billing_project_id', Delete!, FALSE)
   RowsCopy(row, row, Delete!, ids_cust_delete, ids_cust_delete.RowCount() + 1, Primary!)

   Return 2

  End if

End If

 

Please advise.

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

Hi Rajesh,

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.
René Ullrich Accepted Answer Pending Moderation
  1. Tuesday, 16 July 2024 08:02 AM UTC
  2. PowerBuilder
  3. # 2

SQLPreview event support is very limited for PowerServer: https://docs.appeon.com/ps2022/SQLPreview.html

If I understand your code right you want to copy the rows to delete to a datastore instead of deleting them. So I think that you can do this before you do the update. You should also use RowsMove. So you have it not in delete buffer anymore and the update function will not delete it in the database.

HTH,

René

Comment
  1. Rajesh Kanna
  2. Tuesday, 16 July 2024 09:13 AM UTC
Thanks! Rene
  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 16 July 2024 11:37 AM UTC
FYI: the SQLPreview event should be fully supported in PB/PS 2025 (if no complications arise).
  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.