Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to determine the size of a table field
Message
 
À
03/07/2001 19:44:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00526424
Message ID:
00526705
Vues:
19
>>>How can I check in a program the width of a table field?
>>
>>FSIZE(cFieldName [, nWorkArea | cTableAlias] | cFileName)?
>
>remember:
>
>The current setting of SET COMPATIBLE determines if FSIZE( ) returns the size of a field or a file. If SET COMPATIBLE is set to OFF or FOXPLUS (the default), FSIZE( ) returns the size of a field. If SET COMPATIBLE is set to ON or DB4, FSIZE( ) returns the size of a file.

You are correct. I assume people always read the help for details. Here is what Hacker's Guide to VFP has to say:

"FSIZE() is a horror show. Fox Software and Ashton-Tate each went its own way with this function—it's one of the few that is affected by the dreaded SET COMPATIBLE command. If SET COMPATIBLE is OFF or FOXPLUS, FSIZE() returns the field size of the specified field. If FSIZE() is called with SET COMPATIBLE STUPID, er, we mean, ON or DB4, it returns the size of the specified file. Our advice: leave COMPATIBLE SMART (FoxPlus) and use ADIR() to get file sizes."
Doru
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform