tags:

views:

63

answers:

3

I am getting an error while updating data in the data window,which says,Row changed between retrieve and update.What is the soltuion?

+5  A: 

This can occur if you are displaying the same row(s) in more than one (non-shared) DataWindow and then try to update them both. Other causes are incorrect use of SetItemStatus(); incorrect use of the status flags on the update() statement; and finally, the cause this is intended to detect, another user updated the row before you.

Hugh Brackett
Also see [Terry's writeup on Database Irregularities](http://www.techno-kitten.com/PowerBuilder_Help/Troubleshooting/Database_Irregularities/database_irregularities.html).
Hugh Brackett
A: 

Has this been resolved? There are several reasons this could happen, one is if the row has been updated by another user. In the update properties of your dataobject you can choose update method, either using key value, key and modified values, or key and all updatable columns.

If you are SURE there is not concurrency concerns then you can change this setting to "use key value only". It will make the where clause for updates consist of the key value only and other columns will not be evaluated for changes.

It can happen if validation errors occur, you need to remember to set the item status to not modified. To set all rows to not modified you'd do dw_1.setitemstatus(1,0,Primary!,NotModified!) if my memory is correct that would set all columns for row one to NotMofidied!. You can also do a ResetUpdate() or Reretrieve the data.

hope this helps. Rich

DisplacedGuy
A: 

This usually means that some column youve included in the update where clause is bing updated somewhere else, such as through a trigger. another causes include not having empty string is null set for string columns when talking to oracle. oracle converts any empty string send to it to nulls, so a subsequent update wont find the same row unless you tell pb to treat it as null as well. look at the columns you've told pb to include in the where clause ( in the update specs ) and make sure they are really columns you need to have there.

Bruce Armstrong