Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determine The Location Of A Table From A DBC
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01287108
Message ID:
01287124
Vues:
12
What's wrong with the way you're doing it? That's about the way I would code it (fleshed out with saves/restores etc.). I would make it a method or function with the DBC and table names as parameters and the fully qualified filename as the return value.


>I have opened a DBC as a table, and for the objects that are Tables, I don't see how to determine
>the physical location of a table.
>
>I guess I could do:
>
>
>
>CLEAR
>CLOSE DATABASES ALL
>
>sDbc = "Y:\VTC_DEVELOPMENT_FOLDER\VTCDEV\data\vl_bill.dbc"
>
>SELECT 0
>USE (sDBC) ALIAS MyDbc
>
>SELECT ObjectName;
>	FROM MyDbc;
>	WHERE ObjectType == "Table" AND;
>		  NOT DELETED();
>	INTO ARRAY aTables
>
>USE IN MyDbc
>
>OPEN DATABASE (sDbc)
>
>IF TYPE("aTables", 1) # "U"
>
>	FOR EACH sTable IN aTables
>	
>		SELECT 0
>		USE (JUSTSTEM(sDbc) + "!" + sTable) ALIAS MyTable
>		
>		? LOWER(DBF())
>	
>		USE
>	
>	ENDFOR
>
>ENDIF
>
>RETURN
>
>
>Is this possible to determine the table's location some other way?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform