Hello,
thank you for your helping hand, whether in English or german language J 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. Best regards. Olaf Von: [email protected] [mailto:[email protected]] Im Auftrag von Tupy... nambá Gesendet: Freitag, 6. Dezember 2013 18:18 An: [email protected] Betreff: Re: AW: AW: [firebird-support] difficult question Dear mrs.Ann, Thanks for you remembering, excuse me for losing the focus. Mr.Olaf is using almost no code in the application, he is working "data-bound". If he was using triggers, he could do it more easily yet, with generators. And he has almost no control about the lock, because he is using MsAccess to do that. I sugest him learn how to increase the quality of his application, where all this points will be better resolved. Thanks a lot, best regards, Roberto Camargo. On Friday, December 6, 2013 1:49 PM, Ann Harrison < <mailto:[email protected]> [email protected]> wrote: Since this discussion has wandered off into German, I'm going to put this as bluntly as possible in English. Never use "select max (id) + 1 from targetTable" to create unique identifiers. It's the worst kind of bug - one that works when you test your code in single user mode, and fails unpredictably in production. It's also very slow. This warning applies to Firebird and all MVCC databases, and to databases that use lock-based concurrency control if you use either Read Committed or Repeatable Read isolation modes. Generators (aka sequences) were created for a reason. Use them. Luck doesn't enter into it. Cheers, Ann
