Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I see the table that makes the table?
Message
De
08/05/2001 22:23:45
Gavin Reid
L & M Marketing Pty Ltd
Frenchs Forest, Australie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00505091
Message ID:
00505097
Vues:
25
Hi Brenda,

Have a look at ADIR() & AFIELDS() in the online help.

Try something like this:
cMyPath = "c:\mypath\"

=ADIR(aMyDBFs,cMyPath + "*.dbf")

FOR nLoop1 = 1 TO ALEN(aMyDBFS,1)
    * ----- Loop through the DBFs
    USE (cMyPath + aMyDBFS[nLoop1,1])
    * ----- Get an array of DBF fields
    =AFIELDS(aMyFields)
    FOR nLoop2 = 1 TO ALEN(aMyFields,1)
	* ----- Loop through the fields Array
	cFieldName     = aMyFields[nLoop2,1]
	cFieldType     = aMyFields[nLoop2,2]
	nFieldLength   = aMyFields[nLoop2,3]
	nFieldDecimals = aMyFields[nLoop2,4]
    ENDFOR
ENDFOR
Hope this helps,
Gavin.

>I have a need to read a folder of free tables (*.dbf) and pull off each of the table name, field names, and field definition. How can i read in a program the table definition?
>
>Thanks
>
>Brenda
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform