Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Querying DBC Information
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Querying DBC Information
Miscellaneous
Thread ID:
00686638
Message ID:
00686638
Views:
79
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
Next
Reply
Map
View

Click here to load this message in the networking platform