|
Another common way to get a unique key quickly is to have the index be a random number. Using a random number generator you can: generate a number, chain to see if the LO indicator is on, and if so, do the loop again. This is a very fast technique, especially if the index field has room for two or three times the normal level of records expected. In <01BCB470.BC6677A0@S1040066.commsoft.net>, on 08/29/97 at 11:43 AM, Buck Calabro <mcalabro@commsoft.net> said: If you really want any old key (just so you can be sure that you are not getting duplicate keys when you add a new record,) then you can use the technique advocated by many posters: *HIVAL SETGT followed by READP to get the highest key, increment that and you have a new, unique, high key. -- ----------------------------------------------------------- boothm@earth.goddard.edu ----------------------------------------------------------- +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to "MIDRANGE-L@midrange.com". | To unsubscribe from this list send email to MAJORDOMO@midrange.com | and specify 'unsubscribe MIDRANGE-L' in the body of your message. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.