Hi Sergey,
1. Hard to believe, but we never thought of SET NOTIFY, we should've, for a 'warning'.
2. PK - What we want now is to keep the app alive, even in case of duplicate keys - this is a proxy server that validates PINs and other user properties. The problems we have originate from a transition we made recently in the way we get the net PK value. In the old way we got the key by using the file again, ordered by PK, do a GO BOTTOM, increase the value by 1. The new way uses a register that stores the last PK value for each table. Going from the old to the new meant to re-build everything, and have all users restart their computers (some apps are put in systray at startup). We think we've done it... 99% - from time to time someone runs the old code that will add a record to the proxy without updating the value in the registry, so the next record added to the proxy using the new way will be a duplicate. We analyze duplicates every day and hope we'll get to 100% soon, but in the mean time, we think it that returning one wrong answer is better that halting the whole system.
Thank you!
Doru