Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Given a field in data.dbc get the table
Message
De
01/10/2007 15:46:46
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows NT
Database:
Visual FoxPro
Divers
Thread ID:
01257776
Message ID:
01257782
Vues:
17
>I have a scenario where I need to go to the DBC to find a field's table name. In this scenario, I am assured that field names in the DBC are unique.
>
>Has anyone done this before, in an efficient SQL statement. I know this can be done with multiple passes on the DBC inspecting [objectname], [objecttype] and [parentid]...
>
>Any help is most appreciated.

I would create a table with DB information, first, and then fetch information from that table. I do not suggest you open the DBC as a table; instead, you can open the database, get the list of tables with adbobjects(), then get the fields for each table with afields().

Save all the information to a table - fields: "table", "field", and whatever other information from the 16 afields() columns you find relevant - and then start foolin' around with it.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform