Article View: comp.sys.mac.databases
Article #373Re: 4D: Assigning Unique Integers
From: Mike Hennahane
Date: Fri, 06 Nov 1992 00:50
Date: Fri, 06 Nov 1992 00:50
19 lines
1502 bytes
1502 bytes
William Matthew Beaver <wb1o+@andrew.cmu.edu> writes: >Is there a way to assign a unique integer to a field outside of the #N >comand in the layout editor? the "standard" :-) way to do this is to have an extra file in your database called Constants or Sequences. your sequence file has 2 fields: sequence name, and next number. to get the next number all you have to do is search for the correct sequence by name (or you can number them if you prefer) and then use the contents of the next number field; before you unlock the record, you should increment the next number for the next time you want one. the next number is always unique for that sequence as long as you increment it each time it is used. you may have different sequences for each file in your database, and multiuser issues are not a problem (if you can't load the record, you know someone else is using it. just wait until it becomes availale again to get the next number). --mike
Technical Details
Message-ID:
<michaelh.721011036@Xenon.Stanford.EDU>Path:
arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sun-barr!ames!agate!stanford.edu!CSD-NewsHost.Stanford.EDU!Xenon.Stanford.EDU!michaelhReferences:
<IeyNLli00UhW05rJoR@andrew.cmu.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.mac.databases Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sun-barr!ames!agate!stanford.edu!CSD-NewsHost.Stanford.EDU!Xenon.Stanford.EDU!michaelh From: michaelh@Xenon.Stanford.EDU (Mike Hennahane) Subject: Re: 4D: Assigning Unique Integers Message-ID: <michaelh.721011036@Xenon.Stanford.EDU> Sender: news@CSD-NewsHost.Stanford.EDU Organization: CS Department, Stanford University, California, USA References: <IeyNLli00UhW05rJoR@andrew.cmu.edu> Date: 6 Nov 92 00:50:36 GMT Lines: 19