[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: Dataset get-changes get a subset

  • Thread starter Thread starter Håvard Danielsen
  • Start date Start date
Status
Not open for further replies.
H

Håvard Danielsen

Guest
It is possible to delete records from the change dataset after it has been extracted. I'm not at all sure if it is the best approach. You use the dataset top-nav-query to traverse the top levels. For the records that are NOT to be saved you loop through the buffer:num--child-relation and use the buffer:get-child-relation( ):query to traverse and delete the children. The traverse through the children needs to be called recursively. You delete records on each level including the top level, making sure the delete happens after the child delete. The hard part is to get rid of deletes. You may use a similar approach, but you have to traverse the before-buffers, since the after-buffer is gone. You cannot use the child-relations to find the deletes in child data. You also cannot delete the before-buffer records, but have to use buffer:reject-row-changes. I suspect you then ideally should delete the after-buffer that likely was resurrected by the reject. It might be hard to find as there are no rowids that links them. The records row-state should be 0 so it probably does no harm to keep it.

Continue reading...
 
Status
Not open for further replies.
Back
Top