Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get field value from unknown table name
Message
De
09/03/2006 05:06:42
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01102668
Message ID:
01102685
Vues:
11
>Hi everybody,
>
>Assuming I have a table (view) open in a datasession with unknown alias, is there a simple way of finding the value of a field from that table?
>
>In other words, I have, say, 20 tables or views (CAs) open in the DS. One of the tables has cClient_Account_Number field, that I'd like to get a value from. It's not 100% guarantee, that the table, containing this field, is currently opened in this datasession. But if the table (or view) with this field is opened, I'd like to get the value from the current record.
>
>What is the easiest way to get this info? I can think of looping through aUsed array and checking type["Alias.field_name"].
>
>Thanks in advance.

Use FSIZE()

Do you known the alias dbf ?
if yes
if AUSED(aalias,dbfname)>0
  ...=EVAL(m.aalias + '.field_name')
endif
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform