>
I found a problem with this implementation for my particular case. I use a form with a grid and I add records to it. The newly added records don't have ID field populated and therefore this code doesn't work. Do you have an idea of solving the problem?>
>The class was designed with the assumption that each record has a PK. Otherwise, how can you possibly identify which record you are moving? Give each newly added record a PK and the problem is solved.
Hi Marcia,
The problem may arise when you use an updatable view or a cursor adapter and insert new records. In this case the PK is not yet populated.
For my case, luckily, I was able to solve the problem by generating the PK value (I was using a cursor).
If it's not broken, fix it until it is.
My Blog