Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Next 'autoinc' value??
Fri, Jul 16 2021 10:43 PMPermanent Link

Ian Branch

Avatar

Hi Team,
Is there a way to determine the next autoinc value before actually posying the new record?
Regards & TIA,
Ian
Fri, Jul 16 2021 11:16 PMPermanent Link

Ian Branch

Avatar

I should have said programmatically.  Not via SQL.
I can't see anything that looks like edbTable1.LastAutoInc or edbtable1.Nextautoinc. Frown
Ian
Sat, Jul 17 2021 2:27 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Ian


No, and I can't see how there could be. Consider two users (or two threads or whatever). A checks the next autoinc, but whilst this is happening B posts - woops.

The only way to do it is maintain the values yourself.

Roy Lambert
Sun, Jul 18 2021 5:25 AMPermanent Link

Ian Branch

Avatar

Hi Roy,
Actually I meant the last autoinc value.
I cheated and simply open the table, goto last, read the value, close the table, use the value.
All in 4 lines.
Seems to be working fine.
Fortunately, this isn't a multi-user application.

Regards,
Ian
Image