Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Querying DBC Information
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Querying DBC Information
Divers
Thread ID:
00686638
Message ID:
00686638
Vues:
82
Hi All,
I want a sanity check. How many of you have tried this?

Open a database. Instead of using ADBObjects() to query the DBC, use SQL to do the same thing while the DBC is already open.

Run the following code:
open database (home()+'\samples\tastrade\data\tastrade') shared
use (home()+'\samples\tastrade\data\tastrade.dbc') again alias dbc_tastrade shared
select objectname from dbc_tastrade where parentid in ;
   (select objectid from dbc_tastrade where upper(objectname) = 'CUSTOMER' ;
      and upper(objecttype) = 'TABLE') ;
   and upper(objecttype) = 'FIELD'
use in dbc_tastrade
The above query circumvents having to open the customer table and issuing an AFIELDS() on it simply to get a list of fields.

Because the DBC is simply another table, this makes sense. It's just something I have never tried (before today).
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform