Board index » delphi » Current record changes immediately after Post?!?

Current record changes immediately after Post?!?

Did anyone experience something similar? (Here it goes:)

One Paradox table, connected to a TDBGrid.

Edit starts by a Button.OnClick method.

In BeforePost, logging shows record ID "A" (records have unique ID's).
In AfterPost, logging shows record ID "B". After checking I find that new
data went to the right record ("A").

Table is indexed on a field different from ID and that field is not changed
with the Post operation.

The problem is not sistematic (shows only every now and then).

Table is also accesed from within another thread, but still without changing
that indexed field. All thread rules are obeyed (different sessions et. al.)

Is this supposed to happen? BDE & VCL doesn't guarantee preservation of
current record after Post?
Any suggestions, please? (Beside checking always that I am still on the
right record after every Post)



Re:Current record changes immediately after Post?!?

I have never seen or heard of this. One possibility is a corrupt table or
index. You might want to rebuild the table with the table repair utility and
see if that helps.

Bill Todd
(Sorry but TeamB cannot answer questions received via email)
(Remove nospam from my email address to contact me for any other reason)

Re:Current record changes immediately after Post?!?

Thank you.

I think that a corrupt index or table is very unlikely since the same
problem arises in several locations and everything else seems to function
without errors.
However I'll try to check/rebuild the table and its indexes.


(P.S. The name from the previous message was a misconfiguration)

Other Threads