PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → retrieve the ID number of the last inserted key with HADD
retrieve the ID number of the last inserted key with HADD
Débuté par christine.schokkaert, 09 déc. 2004 16:49 - 2 réponses
Posté le 09 décembre 2004 - 16:49
How to retrieve the ID of the last inserted record with
HAdd(FilenamE)
The filename has an ID (unique key which is autonumbering)
I Add a record with the Hadd function.
Can i get in a next statement the value of the last inserted key : the ID ?
Posté le 09 décembre 2004 - 17:18
Hello Christine,
you can get the value imediately after the HADD.
Do simple the following:
HADD(Test)
Trace(Test.TestID) // shows the new auto incremented value
HTH
Raimund
How to retrieve the ID of the last inserted record with
HAdd(FilenamE)
The filename has an ID (unique key which is autonumbering)
I Add a record with the Hadd function.
Can i get in a next statement the value of the last inserted key : the ID ?



http://www.invitec.com
Posté le 25 septembre 2023 - 06:57
Hey, I had this situation right now.
I could not do it with the Trace function, but after HAdd(Orders) I check Orders.ID and it works fine!
It shows me the right now created unique ID.