Re: Which field to use
- From: "Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx>
- Date: Fri, 10 Nov 2006 18:47:44 +0800
An IP address is a 4-byte numeric value. It is not a string, even if it is
commonly displayed as discrete bytes in decimal format and separated by
dots. And limiting the characters to digits does not yield adequate
validation.
If Access had an unsigned Long Integer, that would be ideal. It doesn't, and
I suspect that treating a signed Long as unsigned would be too confusing for
most Access users. So 4 discrete unsigned bytes is the nearest storage match
and clearest visual representation.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Jamie Collins" <jamiecollins@xxxxxxxxxx> wrote in message
news:1163154111.630822.20680@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Nov 10, 5:25 am, "Allen Browne" <AllenBro...@xxxxxxxxxxxxxx> wrote:
I agree with your approach of using the 4 number fields.
It's atomic, and handles different types of domains sensibly.
So you would take a single atomic fact and split it into parts that
only have meaning when considered as a whole, for which you must
concatenate (generally an expensive operation) and change data type in
the process? Having to convert data every time your retrieve is always
a strong indication that your are storing it wrong.
Why not make it CHAR(15) and make the column/field Validation Rule
[0-9][0-9][0-9].[0-9][0-9][0-9].[0-9][0-9][0-9]
and probably some other rules beyond the basic pattern.
Jamie.
.
- Follow-Ups:
- Re: Which field to use
- From: Jamie Collins
- Re: Which field to use
- References:
- Which field to use
- From: Ana_T
- Re: Which field to use
- From: Brendan Reynolds
- Re: Which field to use
- From: Allen Browne
- Re: Which field to use
- From: Jamie Collins
- Which field to use
- Prev by Date: Re: Many-2-many relationships: Can I be told ...
- Next by Date: Re: Many-2-many relationships: Can I be told ...
- Previous by thread: Re: Which field to use
- Next by thread: Re: Which field to use
- Index(es):