Re: How can you create a field that is concatenated?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Jamie Collins wrote:
On Dec 17, 2:12 pm, "Rick Brandt" <rickbran...@xxxxxxxxxxx> wrote:
Good point. Substitute "some interested parties", which encompasses
database designers (you must have seen the post where people are
bothered about non-sequential values and we don't seem able to quite
ease their minds...?)

I just don't believe that because *some* people in *some* circumstances don't
want gaps translates to "never expose AutoNumbers to users because they can have
gaps". There are plenty of circumstances where people don't care about gaps and
each situation should be looked at individually.

I sometimes use random, but display the number in hex. No negative
signs and relatively consistent lengths.

Are you saying you think this makes the Autonumbers suitable to expose
to end users?

Why not? Where I have used it is with records that are submitted to a
centralized database but which are generated by a few hundred external ones. In
this case the "local id" is not of great importance once the record has made it
into the central database, but if I am communicating with an external user it is
nice to be able to positively identify what record (on his end) we are talking
about and while using randomly generated AutoNumbers doesn't guarantee
uniqueness across all external users it comes close enough for my purposes (no
duplicates yet in over 5 years).

Formatting them as hex makes for a much nicer number than the longer decimal
format that would often have a negative sign. To most users the hex value
resembles a serial number since it contains digits and letters and as stated, in
the vast majority of cases they end up eight characters long which I feel is
reasonable for everyone to deal with. It is obvious to all what the field's
purpose is, to identify each record uniquely, but with no expectations about
sequences or gaps.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


.



Relevant Pages

  • Re: clear and delete
    ... No, gaps in the sequence of autonumbers are fine, and only to be ... You're still thinking that there will be blank records in the database, ... sure that this record is not a duplicate. ...
    (microsoft.public.access.formscoding)
  • Re: [PHP] Pragmatically changing a "Record Number"
    ... So to say it another way, I have a table that has 900 records in it, I've added 3 records, but then deleted 2 of those which puts the actual record count at 901 but my auto increment field starts at 904 on the next insert. ... Is there away with PHP that I can pragmatically change that value to the total records in the database more so then a representation of the actual record number? ... I've seen many people who wished to "fix" sequences like this before, usually because they believe there is something "wrong" with there being gaps in there. ...
    (php.general)
  • Re: Database Auto Count what about delete?
    ... > to fill gaps would cause further severe problems (some of which are the ... So every 'type' is stored in the database, ... and re-use deleted styles. ...
    (alt.php)
  • Re: Database Auto Count what about delete?
    ... > to fill gaps would cause further severe problems (some of which are the ... So every 'type' is stored in the database, ... and re-use deleted styles. ...
    (comp.lang.php)
  • Re: [PHP] Pragmatically changing a "Record Number"
    ... So to say it another way, I have a table that has 900 records in it, I've added 3 records, but then deleted 2 of those which puts the actual record count at 901 but my auto increment field starts at 904 on the next insert. ... Is there away with PHP that I can pragmatically change that value to the total records in the database more so then a representation of the actual record number? ... I've seen many people who wished to "fix" sequences like this before, usually because they believe there is something "wrong" with there being gaps in there. ...
    (php.general)