Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Leading 0's problem in data
Message
De
22/05/2015 11:31:37
 
 
À
22/05/2015 05:37:08
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
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:
01620100
Vues:
58
>>I would use an intermediate .controlSource such as a Form.Property, or manage .value myself without .controlSource
>>
>>controlSource = 'thisForm.property'
>>procedure refresh
>>store table.field to (this.controlSource)
>>
>>procedure thisForm.property_assign
>>lparameters propertyValue
>>replace in table field with padl(ltrim(m.propertyValue, '0'), 9)
>>this.property = padl(propertyValue, 9, '0')
>>
>
>And when populating that value from the field, strip the leading zeros
>
>store ltrim(table.field, 1, "0") to (this.controlSource)

We might also want to guard against possible problem of turning an entry of "0" into a blank string.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform