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.

René Ullrich Accepted Answer Pending Moderation
  1. Tuesday, 16 July 2024 08:02 AM UTC
  2. PowerBuilder
  3. # 1

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.