Home » Category » Database & Application Miscellaneous

Database & Application Miscellaneous: Zip/Postal Code and SSN/SIN

212| Sat, 24 May 2008 23:34:00 GMT| janhorner| Comments (5)
Hi All:

What would be the best way to reflect the differences in my program whether
it is for use in Canada or the US?

Would it be better to:

1. Setup a category in the ini file during installation that would utilize
the correct form depending on the country?

2. Use two entryfields in the same location and have one visible depending
on the country they imput?

3. Different programs for different countries?

4. Other suggestions?

Data input isn't the problem but when printing/displaying forms I would like
them to look decent with the proper picture functions depending on the
country. ie: A9A 9A9 for postal and 99999-99-9999 for Zip

Jan Horner
GM #449
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.683 / Virus Database: 445 - Release Date: 05/12/2004

Keywords & Tags: zip, postal, code, ssn, sin, database, application

URL: http://database.itags.org/database-application/158219/
 
«« Prev - Next »» 5 helpful answers below.
Hi Jan,

what about other countries? Just because the program is installed in Canada
or the U.S. doesn't limit the customer base, right?

On a side note: US ZIP format is 99999-9999

I just use a 12 character field for the ZIP code and let the user enter what
they want (no picture clause or other validation) because I don't want to
get involved with formats...

If I wanted to do this, I think I would create a table with country codes
and a string for the picture clause, then present the user with a drop-down
to pick the country and, based on their selection, set the picture clause
dynamically before allowing focus to that field.

HTH,

Another Jan <bg>

jan_hoelterling | Sat, 24 May 2008 23:36:00 GMT |

"Jan Hoelterling" <jhoelterling...compuserve.com> wrote in message
news:c7vq7u$iq4$1...news.dbase.com...
> Hi Jan,
> what about other countries? Just because the program is installed in

Canada
> or the U.S. doesn't limit the customer base, right?


All members of the database would be residing in the same area. (Could be in
Europe but still would have the same structure.)

> On a side note: US ZIP format is 99999-9999
>


That's called rushing. (Think faster than I can type) I always get confused
on the proper break in the code.

> I just use a 12 character field for the ZIP code and let the user enter

what
> they want (no picture clause or other validation) because I don't want to
> get involved with formats...


This would do fine for the display but when it came to the printed forms it
would look unprofessional to read T3J3j8 or 999090980.
> If I wanted to do this, I think I would create a table with country codes
> and a string for the picture clause, then present the user with a

drop-down
> to pick the country


Have a table of country and abbreviations for the Canadian and US codes
already.

So I would add a field in the table call stcodestring and enter A9A 9A9 for
Can code. In the program use this.picture = this.rowset.stcodestring.value.
Am I reading this right?

Not sure if this would work because it might be a drain on the system
resources. I have custom classes for Can and US postal codes. Could add
custom classes for SIN/SSN and do an if or do statement to give visibility
to proper entryfield, freezing the screen first to prevent flicker.

What about a #define statement? On startup could it check for the country,
which you have them enter into a script at startup? Is it possible to use
an if statement within the .h file something like:

if countryabr := "CA"
#define stcode A9A 9A9
else
#define stcode 99999-9999
endif

Always more than one way to skin a cat.

Sure would like some opinions on the most efficient way to solve this
problem as most of the people using the program are not very computer
literate.

Tks Jan you've giving me all lot to think about.

Jan Horner (The Other Jan)
GM #449

PS: Can't even use Jan H.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.683 / Virus Database: 445 - Release Date: 05/12/2004

janhorner | Sat, 24 May 2008 23:37:00 GMT |

Jan Horner wrote:

> "Jan Hoelterling" <jhoelterling...compuserve.com> wrote in message
> news:c7vq7u$iq4$1...news.dbase.com...
> Canada
> All members of the database would be residing in the same area. (Could be
in
> Europe but still would have the same structure.)


If all of the members of the database are in the same country, I would consi
der
having a cc just for the zipcode. Ship the US zipcode to US users, Canadian
to
Canada, etc. There aren't many others that have such a restricted code. Japa
n
and Sweden come to mind.

Glenn Fausel

glennfausel | Sat, 24 May 2008 23:38:00 GMT |

"Glenn Fausel" <gfausel...timessquarerecords.com> wrote in message
news:40A3E33B.AA71142E...timessquarerecords.com...
> If all of the members of the database are in the same country, I would

consider
> having a cc just for the zipcode. Ship the US zipcode to US users,

Canadian to
> Canada, etc. There aren't many others that have such a restricted code.

Japan
> and Sweden come to mind.


Thanks Glenn you make it so simple why didn't I think of that!!

Jan Horner
GM #449
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.683 / Virus Database: 445 - Release Date: 05/12/2004

janhorner | Sat, 24 May 2008 23:39:00 GMT |

Jan Horner wrote:
> "Glenn Fausel" <gfausel...timessquarerecords.com> wrote in message
> news:40A3E33B.AA71142E...timessquarerecords.com...
>
> consider
>
> Canadian to
>
> Japan
>
>
> Thanks Glenn you make it so simple why didn't I think of that!!
> Jan Horner
> GM #449

Simple things from simple minds :-) Had to say that before Fried had a
chance to!!

GlenN

glennfausel | Sat, 24 May 2008 23:40:00 GMT |

Database & Application Miscellaneous Hot Answers

Database & Application Miscellaneous New questions

Database & Application Miscellaneous Related Categories