1. Tim Bruce
  2. PowerBuilder
  3. Tuesday, 27 February 2024 16:46 PM UTC

Sql Server 2019 

PowerBuilder 2019 R3 build 2728

I'm using ODBC connection 

I have a datastore, I change data and then do an update

lds_post_dates.setitem(i, "column_name", ll_value)
ll_rv = lds_post_dates.update()

 

The base table for the datastore has a instead of update trigger on it.  

It already has SET  NOCOUNT  ON

When I execute the update I get the error "Row changed between retrieve and update".

Thanks for any help you can provide

mike S Accepted Answer Pending Moderation
  1. Tuesday, 27 February 2024 18:11 PM UTC
  2. PowerBuilder
  3. # 1

look at your update options on the datawindow definition.  You apparently have 'updatable' columns to include in your where clause.

that means it includes all updatable columns in the where when it issues the update.  if the column value is changed between the select and the update, then you get the row changed error.

 

"The base table for the datastore has a instead of update trigger on it.  "

are you changing data in the trigger?

 

 

Comment
  1. Tim Bruce
  2. Tuesday, 27 February 2024 18:17 PM UTC
The datawindow has Update Properties - Where Clause as Key Columns

The trigger is changing one column value
  1. Helpful
  1. mike S
  2. Tuesday, 27 February 2024 18:55 PM UTC
did you disable the trigger to eliminate that as the cause?



after that you can use the database profiler along with stepping through the PB debugger to see the order of the insert and update to track down when the problem occurs.

  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.