[DUG] Validate data entry
russell
russell at belding.co.nz
Thu Jun 2 09:09:22 NZST 2011
Hello John
A first step could be to capture the data in a control that ensures the data
is correctly formatted.
In the three examples below the format is fixed and ideal for a TMaskEdit
control.
In my document production package I accept data for arbitrary used defined
fields and allow users to specify their format by having them specify the
mask.
Your question is about display. I have not faced that question yet. If the
data is properly formatted could you display the data as strings?
Regards,
Russell
-----Original Message-----
From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz] On
Behalf Of John Bird
Sent: Thursday, 2 June 2011 12:00 a.m.
To: NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] Validate data entry
I have a related question - I have been wondering how to display data in a
dataset that is not either simple integer, string or date-time.
Examples are:
dates stored as an 8 digit integer (YYYYMMDD) (want to display as
dd-mmm-yyyy and I already have the code to format it how I want)
IRD numbers - 9 digits displayed as XXX-XXX-XXX
Bank accounts integers displayed as XX-XXXX-XXXXXXX-XX
Credit card numbers displayed as XXXX-XXXX-XXXX-XXXX
in each case stored as integers, but how could I intercept the display on
displaying the data and after entry to reformat them like this?
What do others do?
For displaying I am hoping the answer is not just to store them as strings,
as I still have the issue of how I validate entry.
John
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi at delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject:
unsubscribe
More information about the Delphi
mailing list