[thelist] TIP: i owe, so finally i have !one!

Chris W. Parker cparker at swatgear.com
Fri Jul 12 17:55:01 CDT 2002


<tip author="chris parker" type="database design">
although this may be grossly apparent to some people, when dealing with
databases and datatypes make sure you've chosen the right one!

That of course is obvious, but take for example what I just spent ten
minutes figuring out.

i was inputting a number (phone number) in my database. i wouldn't get
any errors when i used my test phone number (1231231234). however when i
used any other regular number, (like 6263513410) i would get an error
that did not point me to the answer (i'm using access/asp and they tend
to give mysterious errors). i realized i had defined the phone number
field as a number. this is logical though because i thought "well i'm
inputting a number, so it should be stored as a number in the db". it
turns out this is not true. the test number worked because it did not go
over the max value that the db could hold for that field. however the
real phone number did not work because it was too large, even though it
had the same number of digits. so i realized that it should be set to
"text" instead.

mind your p's and q's!
</tip>



More information about the thelist mailing list