>Thanks for the tips, but I think I found what's causing the problem, and it does indeed seem to be a lingering object reference.
>
>I use several "FOR EACH oSubObj IN oObjRef" Loops and these seem to be the cause, because if I replace them with something like:
>
>FOR m.nIndex = 0 TO m.oObjRef.Length - 1
> ...
>ENDFOR
>
>I don't get the problem, reasons anyone?
Could it be the For Each and For ... To mechanisms are internally different? One thing I'd try would be to explicitly release oSubObj once out of the loop.
Just to add: a dangling datasession happened to me when the uncommited changes were due to an attempted duplicate primary key, but then TableRevert() cleaned them up (or if I tried Clear All, it prompted me to revert and I clicked Revert).