P
Paul
I've seen some code today that does something perplexing:
The scenario goes like this:
Some records are selected from some tables and joined by a query
Edit is called and one if the fields is changed
A value is changed
Update is called
<other stuff happens>
Edit is called again and the value in the underlying table reverts to
what is was before the last change. Infact just opening a separate
recordset of that table and doing an Edit on it has the same effect of
making the value revert.
The change clearly happens across the call to Edit, so what's going on ?
If the value of the underlying table is changed directly rather than
through the joining query the effect doesn't seem to happen.
No amount of requerying seems to change anything, but sticking the whole
thing in a trasnaction seems to make the problem go away.
I wouldn't rule out something like mismatched Edits and Updates, but I'd
hope for an error or something else in that case, not values that
magically change when you call Edit.
Does anyone know anything about this or has seen anything like it?
I've seen articles about changes being discarded if you don't move of the
record before closing and wondered if it might be something like that.
Thanks,
Paul
The scenario goes like this:
Some records are selected from some tables and joined by a query
Edit is called and one if the fields is changed
A value is changed
Update is called
<other stuff happens>
Edit is called again and the value in the underlying table reverts to
what is was before the last change. Infact just opening a separate
recordset of that table and doing an Edit on it has the same effect of
making the value revert.
The change clearly happens across the call to Edit, so what's going on ?
If the value of the underlying table is changed directly rather than
through the joining query the effect doesn't seem to happen.
No amount of requerying seems to change anything, but sticking the whole
thing in a trasnaction seems to make the problem go away.
I wouldn't rule out something like mismatched Edits and Updates, but I'd
hope for an error or something else in that case, not values that
magically change when you call Edit.
Does anyone know anything about this or has seen anything like it?
I've seen articles about changes being discarded if you don't move of the
record before closing and wondered if it might be something like that.
Thanks,
Paul