Re: Global Address/Phone/SSN[Country ID]

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

From: John Saunders (johnwsaundersiii_at_hotmail.com)
Date: 10/01/04


Date: Fri, 1 Oct 2004 16:19:44 -0400

Kamaluokeakua" <Kamaluokeakua@discussions.microsoft.com> wrote in message
news:9FB8CBD0-6F96-4E35-9E03-52E9364AA26D@microsoft.com...
>I have to write an application that deals with clients in multiple
>countries.
> The addresses, phone numbers, country id[social security number] and
> currency information has to be stored into a database that allows for the
> format of any country. I would like to be able to automatically display
> the
> information in the format of their country based on the information
> gathered
> from the Country field in the database.
>
> Is there any white paper, or book or site that has information on
> designing
> a component that will change it's format automatically so I can customize
> the
> format on the fly instead of having so many different controls based on a
> country. Or should I make several different controls and call them based
> on
> the data retrieved from the database? I basically want to display the
> address, phone number and SSN/Country ID in the format that is the
> standard
> of the country that it comes from. For example I don't want to force
> users
> to enter a phone number with a mask of (999) 999-9999 if they are in a
> country that doesn't have that format. Or force the entry of a SSN when
> the
> country utilizes a different format than 999-99-9999.
>
> The following are the countries:
> England, France, Germany, Switzerland, Holland, Spain, Portugal, Taiwan,
> China [mainland and Hong Kong], Australia, Brazil, Mexico, Canada, France,
> Italy, and Japan.

I would recommend that you simply accept these values as text strings. In
particular, unless your application needs to know what the area code of a
phone number is, you shouldn't care what they typed in. Also, keep in mind
that they may be entering a phone number which is valid in a country other
than the country they're presently "in" or "from". Someone might live in
Switzerland but work in Germany, for instance, so might need to enter a
Swiss phone number even though they are in your database as being from
Germany (or vice versa).

Also consider that your program probably doesn't want to go learn all of the
formats for all of the countries you might deal with, and you don't want to
have to update those formats when they change in a particular country.
-----
John Saunders



Relevant Pages

  • Re: think when starting: formats (dates, places, ...)
    ... If I'd been starting out now, I'd have used the ISO format - year, ... produce lists of events sorted by place. ... "town/village, country subdivision, country", which means that the list ... the spelling of placenames changes, ...
    (soc.genealogy.britain)
  • Re: think when starting: formats (dates, places, ...)
    ... If I'd been starting out now, I'd have used the ISO format - year, ... produce lists of events sorted by place. ... "town/village, country subdivision, country", which means that the list ... the spelling of placenames changes, ...
    (soc.genealogy.britain)
  • Re: What gives data meaning?
    ... in the netherlands you have 4 digits and 2 characters. ... neither zip code means anything to the database. ... dutch_address(id, country, dutch_zipcode) ... The format of dutch_zipcode and us_zipcode could be ...
    (comp.object)
  • think when starting: formats (dates, places, ...)
    ... If I'd been starting out now, I'd have used the ISO format - year, ... subdivision is a county for UK, a state for US, and so on). ... produce lists of events sorted by place. ... "town/village, country subdivision, country", which means that the list ...
    (soc.genealogy.britain)
  • Re: What prefix for Las vegas??
    ... operating agreements specify amateur station ID as: ... Relating to the Operation by Citizens of Either Country ... amateurs must carry proof of their US citizenship and their valid US ... so the preferred format would be W7/G3XYZ ...
    (uk.radio.amateur)