Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding field information similar to AFIELDS()
Message
De
01/02/2001 17:16:01
 
 
À
01/02/2001 17:04:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00471467
Message ID:
00471502
Vues:
15
Yeah, I saw it afterwards. I'm a bit slower than you guys.

BTW, I like your PADL() trick to get the number of decimals. I saw it suggested the other day when Vlad mentioned a problem with TRANSFORM().


>>Fred,
>>
>>Can't you use FSIZE()? Combined with your suggestion this should work.
>>
>
>See replies to/from Mark to/from me. ;)
>
>>
>>>>I need to find out information about a field in a table. However, this field may not be in my currently selected table, and I do not want to use AFIELDS because it returns too much information to wade through. Specifcally, I need to know the type, size, and (if applicable) decimal precision of my field. I haven't found a native VFP function that will provide this information for a single field. A simple UDF seems to be my next option, so any suggestions in that direction would be appreciated.
>>>
>>>Sorry, AFIELDS() is one of the few ways that can return all the information about a field like width and precision for numeric fields. You can get the number of decimal places, but not the width of a numeric field:
>>>
>>>nWidth = 20
>>>nDecimals  = nWidth - RAT(".",PADL(numericfield,nWidth))
>>>
Daniel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform