PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → HFSQL: re-use automatic id
HFSQL: re-use automatic id
Débuté par Piet van Zanten, 18 sep. 2017 11:27 - Aucune réponse
Posté le 18 septembre 2017 - 11:27
Hi,

I'm implementing an undo function.
Among other things it can restore deleted records from a buffer.
Now I was wondering if it would be safe to re-use the automatic identifier from the original record.
HFSQL never uses the id's of deleted records again, so I'm guessing it would be safe.
No big deal, since we will not likely run out of id's.
I guess I still have an compulsory urge to re-use and optimize. (from my early programming days)

Also, it's not entirely clear to me what exactly is the difference between hSetIdAuto and hForceIdAuto.
If I understand correctly the difference is that hSetIDAuto will always use the highest id+1 an hForceIdAuto will do the same, but ignoring the manually added id.

Kind regards,
Piet