Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Strange AfterPost Issue..
Sun, Jun 30 2024 9:33 PMPermanent Link

Ian Branch

Avatar

Hi Team,
I have a field in a table that is an Integer autoinc.  So the value is set when the record is posted.
In my AfterPost event, the first thing I do is retrieve that field's value for use elsewhere.
Very occaisionally, the retreived record value is NOT the value of the inserted record but some earlier record value of that field.
It's not consistent which suggests it isn't systemic, however it is happening more often than I like.
It is happening in the two Apps that insert new records into the table.
Has anybody else experienced this?
If you have, did you find out why/how?

Regards & TIA,
Ian

P.S.  When a User recently reported this I was sceptical, however, on detailed investigation I discovered this has been going on since 2018.  They just hadn't bothered to report it to me. Frown Naturally I want to get it fixed.
Mon, Jul 1 2024 3:00 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Ian


I do not believe I have had an instance of that, but who knows I might have had but not noticed Smiley

The only explanation I can come up with is something, sometimes, for some reason moving the cursor on that table between your posting the new record and grabbing the autoinc. Could be a background thread if you don't have it correctly isolated.

Roy Lambert
Image