Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Linkage service & Row changed between retrieve & update

28 views
Skip to first unread message

Gourabmoy Nath

unread,
Dec 18, 1997, 3:00:00 AM12/18/97
to pfc...@rssi.com


Hello all,

Consider a master and a detail dw linked by ai_setusecollinks = 2
Whenever I make a change in one of the fields in the detail and try to
save it
(using the save menu item that comes with PFC)
I was getting an error "Row changed between retrieve and update"
The detail dw is set to key and updateable. However with the same
settings any change in the master works OK

AFAIK, "Row changed between retrieve and update" happens when
the where clause cannot locate the row in which the data is to be
changed. Now, in my case there was no other user modifying the rows
of the table I was working in. SO the multiple user problem was
ruled out. Second, I was not doing any setitems, so another direction
of the problem is ruled out.

I then checked the return code of pfc_save to find that -6 was returned

which means that the pfc_update was failing that is the following line
was returning a -1

li_save_rc = This.Event pfc_Update (ipo_pendingupdates)

Finally going all the way through I traced that in the pfc_update event
of u_dw the following line was returning a -1
li_rc = this.Update(ab_accepttext, ab_resetflag)

I also examined the trace through of_CreateUpdatesequence in
n_cst_dwsrv_linkage
and found that the the control array contained the detail datawindow
twice
I concluded that the update on the dw was being done twice so the error
"Row changed between retrieve and update". I therefore tried somehow
tried to override the control array and get rid of the same elemnt twice

That worked but only for the first time. Means that when I opened a new
record
by a id, I saved it , it was Ok, I did a re-retrieve and I could see the

lastest data that I saved, but then I changed it and tried to save it
and I get the error "Row changed between retrieve and update" again.

Finally I coded the pfc_update event of the sheet window to return a 1
and all went fine. There were no messages ""Row changed between retrieve
and update".
I did not code any Acceptext in the detail dw.

Now although I got a solution(hopefully), but I am just trying to
understand
what has happened
and how. Could some one please explain the mechanism very lucidly.

Thanks a lot.

Gourab

0 new messages