>Excatly, that's why we need a bullet proof mecanism which will work all the time. :)
I read in some mag, and have since adopted the following technique for generating primary Keys...
- take padr(alltrim(sys(1)) + alltrim(str(seconds()*1000)), 20, "0"), this creates a key that is virtually impossible to corrupt, but, the possibility exists, so, in my Table operations class, when I issue a save, I check to see if tableupdate() is sucessful, if not, I check to see if it is a primary key problem, if so, I simply replace the last "0" in the key with a "1".
I know it sounds a little hokey, but it works like a champ, an added benefit, is that it becomes very reliable when you allow users to work remotely, and upload their changes!
Thought you might find this interesting
John Adams
John Adams
John T. Adams
Software Consulting Services