Hi all (and Merry Christmas).
I have an insert query. When the user clicks save, I want the insert statement to return the number from the ID field of the table which is autoincrement (and is auto completed by the database).
The problem is that the database sits on a server and many users use it. So doing a MAX(ID) after insert there is a possibility that another user has pressed saved and the wrong number returned.
Any ideas?
Thanks,
George
I have an insert query. When the user clicks save, I want the insert statement to return the number from the ID field of the table which is autoincrement (and is auto completed by the database).
The problem is that the database sits on a server and many users use it. So doing a MAX(ID) after insert there is a possibility that another user has pressed saved and the wrong number returned.
Any ideas?
Thanks,
George