Hey Eric. I just duplicated this as well. I guess you need/want to requery after the rollback. To be quite honest, this is probably good practice anyway since the values might have changed in the interim.
>I have an odd scenario, and I suspect that I must be missing something obvious, but am having no luck with web and archive searches.
>
>Our business logic works as follows (Fox-like pseudocode, error checking excluded):
>
>FUNCTION BusinessObject.Save()
> Connection.BeginTrans()
> IF THIS.Verify()
> AdoRecordSet.UpdateBatch()
> ENDIF
> FOR EACH ChildBizObject
> ChildBizObject.Save()
> ENDFOR
> IF THIS.AnythingFailed
> Connection.RollbackTrans()
> ELSE
> Connection.CommitTrans()
> ENDIF
>ENDFUNC
>
>The problem is that for a new record (appended locally, edited in UI), the value of AdoRecordSet.Fields('x').OriginalValue changes during UpdateBatch(), but does not revert during RollbackTrans(). If the user then corrects whatever caused the error and retries, I get a concurrency error stating that the record has been deleted. (I suspect that the AdoRecordSet is trying to issue an Update instead of re-issuing an Insert.)
>
>Does anyone have any suggestion for resolving the situation? My first thoughts were to manually null the original values or somehow force an insert, or perhaps find a way to make the OriginalValue fields revert during the rollback, but I have not found any way to do so thus far.
>
>Help is much appreciated.
>
> . . . . . . . -- Eric
The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts. - Bertrand Russell