Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Leading 0's problem in data
Message
De
23/05/2015 15:56:22
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01620054
Message ID:
01620122
Vues:
46
Hi,
I would add a new field to your table: Suffix c(1) and combine your trans(OriginalNumField)+suffix to the end result/
Koen

>Hi Gang!
>
>Question....
>
>We have need to start using a field in a table that is, at the moment, Numeric (11,0), but in the future, to be Character C(11). The reason is government, of course... wanting to have Alpha data at the end of the numeric part.
>
>When the page would come up for the field on the form, in the past, the user could type in numeric data and be happy.
>
>Then, it came to pass that some entities wanted to have this padded on the left with '0's. Like 123 became 00000000123 when sent to the processor (as a string, not as a numeric at this point. It was still stored as numeric on the Server with NO leading 0's.
>
>This was handled by setting the FORMAT of the textbox for this field to be 'L' ( place leading 0's) and a Inputmask of 99999999999... but only for a numeric field.
>
>------
>
>NOW... they want to be able to have alpha data on the end of the field.... so we must change it to be C(11).
>
>Problem is -> How do you have the textbox to show leading '0's on the textbox, and be Editable at all times, yet be stored in the field WITHOUT the leading '0s'.
>( 123AB become 000000123AB in the textbox but in the stored field it will be ' 123AB' )
>
>
>Thanks!
>Tommy
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform