Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Field exist?
Message
De
26/10/2001 16:01:37
 
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Titre:
Divers
Thread ID:
00573872
Message ID:
00573941
Vues:
18
>>Hi all,
>> Is there a simple way to determine if a field name exists in a table? There may be 40 or 50 fields in a given table, and using 10 to 15 tables from the command window sometimes leaves us to forget if a table had those particular fields added.
>> I thought using AFIELDS() and then ASCAN(), but isn't there a little better way than scanning the entire table structure array? I saw the aColScan() FUNCTION in 'Hacker's Guide 6' but that seems like a lot to do just to see if a particular field name exists, plus LPARAMETER doesn't exist in FPW. Something like a reverse FIELD() function that returned T or F would be real nice.
>> Any ideas?
>>Pete
>
>llFieldExists = (type('mytable.myfield')#'U')

That is so cool! It's perfect. But you got me! I haven't been able to interpret the line. It looks like a directive because of the #, but I can't find anything that looks like what you've got. Could you please explain how it works? Slowly for thick heads like me, please.

Pete
Peter Adams
FoxPro Programmer
Compu-Mail

Heisenberg was probably right...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform