On Wed, 2008-12-10 at 05:07 -0800, danielk wrote: > On Dec 9, 2:45 pm, Jim Idle <[EMAIL PROTECTED]> wrote: > > On Mon, 2008-12-08 at 15:12 -0800, Rick Weiser wrote: > > > Walt, > > > > > No, you must perform this operation programmatically. Here is a > > > simple example: > > > > Walt, > > > > If you are using 4.1 then you can use the UNIQUEKEY function: > > > Be careful with this! The UNIQUEKEY() function can return a '/' as > one of the characters in the key (a painful lesson I might add), so > you may want to do something like: > > id = CHANGE( UNIQUEKEY(), '/', ']2F' ) > > Jim, you're fired for not pointing this out ;-)
UNIQUEKEY is not really meant for writing records to directory files, as it is a performance related enhancement which will be rendered useless if you write to directories. Hence you are fired for not knowing this. The punishment for trying to fire me is too terrible to contemplate. The main reason for using UNIQUE key instead of incrementing an item ID, is that in order to increment the item ID you have to use READU. If you have 5000 clients all cracking away at the system, then waiting for, taking, and releasing this lock becomes a bottle neck. If however, you are writing to directory files, then this will be the least of your worries and you should fix that before looking to UNIQUEKEY. Besides, it clearly states in the documentation that it uses base64 encoding, which, as any fule no, contains the '/' character. Jim --~--~---------~--~----~------------~-------~--~----~ Please read the posting guidelines at: http://groups.google.com/group/jBASE/web/Posting%20Guidelines IMPORTANT: Type T24: at the start of the subject line for questions specific to Globus/T24 To post, send email to [email protected] To unsubscribe, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jBASE?hl=en -~----------~----~----~----~------~----~------~--~---
