Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to determine the size of a table field
Message
 
To
03/07/2001 19:44:57
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00526424
Message ID:
00526705
Views:
18
>>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform