Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VarChar ?
Message
De
09/07/2004 16:15:06
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro Beta
Titre:
Divers
Thread ID:
00922385
Message ID:
00922707
Vues:
20
Terry,

>>You see the difference when you make use of the fields and don't have to TRIM, for instance.
>
>Ahhhh ... Thank you!

To illustrate, with Char(10) and VarChar(10) containing "1234":
? MyChar+"|"   && 1234      |
? MyVarC+"|"   && 1234|
Actually, there is a difference in the way they are stored in the DBF. They occupy the same space but the last character in the field is different for VarChar (if the value is shorter than the field length). In that case, it contains a hex for the actual length of the value.

For example, Char(10) and VarChar(10) in a table, put value "1234" in each. Open the DBF with MODI FILE and check the 10th character of each. The VarChar will have CHR(4) in the 10th character.
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform