Olaf, Stil for this problem, there is a possible solution. If you have only one user at each time, and if the user have the possibility of deleting only the last that have been inserted, you can use a delete trigger, that will renew the value of the generator (the next value that will be generated) in a manner that the next new id to be generated will be the one that has been deleted. Inside the trigger, you can compare the Id of the record to be deleted with the generator value to be sure that the last generated will be deleted and, if really so, update the value of the generator.
This will need some learning and tests of you, but if so is the usage environment, there is a big chance you will get this resolved. Good luck, Roberto Camargo. On Monday, December 9, 2013 3:56 PM, Mark Rotteveel <[email protected]> wrote: On 9-12-2013 19:29, checkmail wrote: > I have change it, now the IDs were created by trigger. Only one > disadvantage arises, if the user deletes the last recordset and creates > a new, the last skipped now. Why is that a disadvantage? Holes in your numbering would also happen if a user deleted a different recordset (eg the second last) instead of the last. Mark -- Mark Rotteveel ------------------------------------ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Visit http://www.firebirdsql.org and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Yahoo Groups Links (Yahoo! ID required) http://info.yahoo.com/legal/us/yahoo/utos/terms/
