1. Sim Joo Pee
  2. PowerServer
  3. Friday, 27 October 2023 14:20 PM UTC

Hi

   I am using PB2022 Build1900. DB Mssql.  I have problem when 3 and above cloudpp/application running concurrently where it will update the same table for a value.  It always failed to update the table at the very last cloudapp/application. I dnt have this issue when there is only two cloudapp/application running concurrently. Please advice. I already running out of idea. Thank you.

Sim Joo Pee Accepted Answer Pending Moderation
  1. Monday, 30 October 2023 01:34 AM UTC
  2. PowerServer
  3. # 1

Hi Sir,

 

  I am attaching my application.json file for you reference. Anything wrong with that?

Thanks in advance.

Attachments (1)
Comment
There are no comments made yet.
Sivaprakash BKR Accepted Answer Pending Moderation
  1. Saturday, 28 October 2023 05:04 AM UTC
  2. PowerServer
  3. # 2

Have you tried manually locking the record before updating it?  

Herebelow is the code manually lock a record [ code generated by Bing Chat GPT-4.  Regular warnings apply ]

****************************************

To manually lock a record in SQL Server, you can use the WITH clause with the XLOCK and ROWLOCK hints to lock and update a specific record 1. Here is an example of how to lock a row:

SQLAI-generated code. Review and use carefully. More info on FAQ.
 
BEGIN TRANSACTION;
SELECT * FROM table_name WITH (XLOCK, ROWLOCK) WHERE record_id = 123;

To unlock the record, you can use the COMMIT TRANSACTION command 2. Here is an example of how to unlock a row:

SQLAI-generated code. Review and use carefully. More info on FAQ.
 
COMMIT TRANSACTION;

I hope this helps! Let me know if you have any other questions.

*******************************************

If not tried, can try this one.

Happiness Always
BKR Sivaprakash

 

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 27 October 2023 14:44 PM UTC
  2. PowerServer
  3. # 3

Hi Sim;

  There could be many reasons for this. We would need a lot more details about your App's processing profile, DBMS settings, environment, Transaction characteristics, etc in order to even "try" to answer what could be the issue (IMHO).

Regards ... Chris

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.