From: Mathias on
Hi all,

As we are trying to reach new markets in Australia, Great Brittain and
Germany with one of our products I am trying to solve the problem of
making the application capable to handle addresses from different
countries in the same database while still having the ability to sort
by street, town, name, postal code and so on. So the problem is to
handle a definition for the address layout, edit labels and column
captions and to have the information divided into several different
fields so that you still can sort on any particular part of the
address, even across addresses from different countries.

My thoughts on this so far is to have an xml-structure carrying the
address format description and to have use a reusable window for
adress editing so that it can be reused in different windows. This
adress window would read the xml information and dynamically show the
correct number of edit fields depending on the defauld adress format.
The user should also be able to change to another address format if he
wants to register an address in another country and the controls would
then adjust to the new address format.

I are also thinking about letting some fields be "required" and other
fields to be optional and displayed with different background colours.

And now to the questions:
Any general thoughts on this?
Would I be able to support all address formats using this design?
How would it work in your country?
Do you know any resources on address formats on the internet (better
than the link at the end of this message)?

-----------------------

Fields:
AdrFormatGUID
AdrName
AdrCO
AdrDepartment
AdrStreet
AdrPostNo
AdrCity
AdrCountry
AdrExtra1
AdrExtra2
AdrExtra3

The addressinformation in the address format table:
 
<AdressFormat>
                      <Name>Swedish</Name>
                      <Captions>
                                            <AdrName>Namn</AdrName>
                                            <AdrCO>C/O</AdrCO>
                                            <AdrDepartment>Avdelning</
AdrDepartment>
                                            <AdrStreet>Gata</
AdrStreet>
                                            <AdrPostNo>Postnr</
AdrPostNo>
                                            <AdrCity>Ort</AdrCity>
                                            <AdrCountry>Land</
AdrCountry>
                      </Captions>
                      <Layout>
                                            <Line1>[AdrName]</Line1>
                                            <Line2>[AdrCO]</Line2>
                                            <Line3>[AdrDepartment]</
Line3>
                                            <Line4>[AdrStreet]</Line4>
                                            <Line5>[AdrPostNo]
[AdrCity]</Line5>
                                            <Line6>[AdrCountry]</
Line6>
                      </Layout>
                      <Masks>
                                            <AdrPostNo>999 99</
AdrPostNo>
                      </Masks>
</AdressFormat>

<AdressFormat>
                      <Name>Great Brittain</Name>
                      <Captions>
                                            <AdrName>Name</AdrName>
                                            <AdrCO>C/O</AdrCO>
                                            <AdrDepartment>Department</
AdrDepartment>
                                            <AdrExtra1>Building</
AdrExtra1>
                                            <AdrStreet>Street</
AdrStreet>
                                            <AdrExtra2>Locality</
AdrExtra2>
                                            <AdrCity>Town</AdrCity>
                                            <AdrExtra3>County</
AdrExtra3>
                                            <AdrPostNo>Postal code</
AdrPostNo>
                                            <AdrCountry>Country</
AdrCountry>
                      </Captions>
                      <Layout>
                                            <Line1>[AdrName]</Line1>
                                            <Line2>[AdrCO]</Line2>
                                            <Line3>[AdrDepartment]</
Line3>
                                            <Line4>[AdrExtra1]</Line4>
                                            <Line5>[AdrStreet]</Line5>
                                            <Line6>[AdrExtra2]</Line6>
                                            <Line7>[AdrCity]</Line7>
                                            <Line8>[AdrExtra3]</Line8>
                                            <Line9>[AdrPostNo]</Line9>
                                            <Line10>[AdrCountry]</
Line10>
                      </Layout>
                      <Masks>
                                            <AdrPostNo>999 99</
AdrPostNo>
                      </Masks>
</AdressFormat>

Adress formats in different countries:
http://www.bitboost.com/ref/international-address-formats.html#Formats

/Mathias
From: richard.townsendrose on
Mathias

if you email me at richard at tdoc dot net i can send you the royal
mail's postal address file specifications ...

what is unique is the HouseNo or HouseName [which are in DIFFERENT
fields] + postcode


only thing is field sizes and UK postcode format which ranges from
AA99 9AA to
A9 9AA

AA99 / A9 is the local sorting office, and 9AA is the delivery round

richard