1. Amulya Kashyap
  2. PowerServer
  3. Tuesday, 6 February 2024 13:55 PM UTC

Hi Team,

We are using Powerserver CloudPro Edition. 

 

We have a datawindow where a column is an Identity column and has a Primary constraint. We are updating the Identity value in UpdateEnd event of the Datawindow. Before that, we are trying to fetch the SQLSyntax from SQLPreview event. If SQLSyntax has 'INSERT' word, then we are updating the Identity value. However, code in SQLPreview event is not getting executed. Thus, UpdateEnd is failing. 

Please help!

Accepted Answer
Angie Liu@Appeon Accepted Answer Pending Moderation
  1. Wednesday, 7 February 2024 05:39 AM UTC
  2. PowerServer
  3. # Permalink

Hi Amulya;

 

As René Ullrich said below, currently PowerServer has limited support for SQLPreview Event. We plan to enhance the support for SQLPreview Event in PS 2025.

 

For now, please refer to the workaround provided by René Ullrich.

 

Regards

Angie

Comment
There are no comments made yet.
Amulya Kashyap Accepted Answer Pending Moderation
  1. Wednesday, 7 February 2024 05:30 AM UTC
  2. PowerServer
  3. # 1

Thanks for the response.
Is there a event/method which fetches the SQL Syntax submitted to DBMS? I mean an alternative for SQLSyntax of SQLPreview event.

 
 
 
Comment
  1. Angie Liu@Appeon
  2. Wednesday, 7 February 2024 06:32 AM UTC
Sorry, currently there is no alternative available to get SQLSyntax.
  1. Helpful
There are no comments made yet.
Ronnie Po Accepted Answer Pending Moderation
  1. Tuesday, 6 February 2024 19:00 PM UTC
  2. PowerServer
  3. # 2

You shouldn't have to use the UpdateEnd event to get the value of the identity column.

It should contain the correct value following a successful dw.Update().

Depending on your DBMS and on how the identity property has been implemented, you may have to edit your pbodb.ini file, but for the most common supported database vendors, this should work out of the box if you specify the identity column in the DataWindow's Update Properties:

 

 

Comment
There are no comments made yet.
Amulya Kashyap Accepted Answer Pending Moderation
  1. Tuesday, 6 February 2024 17:29 PM UTC
  2. PowerServer
  3. # 3

Hi Ullrich, Thanks for the Response. Is there a event/method which fetches the SQL Syntax submitted to DBMS? I mean an alternative for SQLSyntax of SQLPreview event.

Comment
There are no comments made yet.
René Ullrich Accepted Answer Pending Moderation
  1. Tuesday, 6 February 2024 14:56 PM UTC
  2. PowerServer
  3. # 4

There are some limitation for sqlpreview event with Powerserver: https://docs.appeon.com/ps2022/SQLPreview.html

 

See here for a possible workaround: https://community.appeon.com/index.php/qna/q-a/powerserver-sql-preview-support

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.