Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to determine the size of a table field
Message
From
03/07/2001 14:59:47
Chris Berthold
The COMMERCIAL Group, Inc.
Sarasota, Florida, United States
 
 
To
03/07/2001 14:34:56
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00526424
Message ID:
00526441
Views:
14
LEN(a_table->fldname) works well for character and memo fields

a more general way of getting the shape and form of any field of a cursor/table out of any free table/dbc would be to use.

ln_fields = AFIELDS(la_array, "a_table")


Where la_array = an array to create with the structure of the table
"a_table" the character representation of the table
ln_fields = number of returned fields in the array


array structure
1 = Field name Character
2 = Field type:
C = Character
D = Date
L = Logical
M = Memo
N = Numeric
F = Float
I = Integer
B = Double
Y = Currency
T = DateTime
G = General Character
3 = Field width Numeric
4 = Decimal places Numeric
5 = Null values allowed Logical
6 = Code page translation not allowed Logical
7 = Field validation expression Character
8 = Field validation text Character
9 = Field default value Character
10 = Table validation expression Character
11 = Table validation text Character
12 = Long table name Character
13 = Insert trigger expression Character
14 = Update trigger expression Character
15 = Delete trigger expression Character
16 = Table comment Character
Previous
Reply
Map
View

Click here to load this message in the networking platform