Discussion:
Accessing All Tables In A DBC
(too old to reply)
Andy Trezise
2004-11-10 14:10:49 UTC
Permalink
Is there a command to retrieve all the tables within a database in to an
array? Similar to AUSED but for ALL tables in the database.
Rick Bean
2004-11-10 14:20:47 UTC
Permalink
Andy,
From the 6.0 Help file:
ADBOBJECTS( ) Function Example

The following example opens the testdata database and uses ADBOBJECTS( ) to create an array named gaTables containing names of tables in the database. The tables names are then displayed.

* Close any open databases
CLOSE DATABASES

* Clear desktop to prepare for displaying the array
CLEAR

* Open sample testdata database
OPEN DATABASE (HOME(2) + 'Data\testdata')

* Function call with cSetting for table names
=ADBOBJECTS(gaTables, "TABLE")

* Displays array gaTables created by ADBOBJECTS( ) function
DISPLAY MEMORY LIKE gaTables
Post by Andy Trezise
Is there a command to retrieve all the tables within a database in to an
array? Similar to AUSED but for ALL tables in the database.
Mark
2004-11-10 14:22:12 UTC
Permalink
Hi Andy,
You might want to consider the DBGETPROP() function.
hth
Mark
Post by Andy Trezise
Is there a command to retrieve all the tables within a database in to an
array? Similar to AUSED but for ALL tables in the database.
Andy Trezise
2004-11-10 14:37:49 UTC
Permalink
But I don't know the names of the tables. DBGETPROP() doesn't seem to let me
get at them.
Post by Mark
Hi Andy,
You might want to consider the DBGETPROP() function.
hth
Mark
Post by Andy Trezise
Is there a command to retrieve all the tables within a database in to an
array? Similar to AUSED but for ALL tables in the database.
Anders Altberg
2004-11-15 12:24:09 UTC
Permalink
If you know thge name ofd the database:
OPEN DATABASE x
ADBOBJECTS(aArrayTables,'TABLE')

If you don't know what databases are open use ADATABASES(aArrayDB).
AUSED(aArrau, nSessionNUmber) returns the facts about open tables.
-Anders
Post by Andy Trezise
But I don't know the names of the tables. DBGETPROP() doesn't seem to let me
get at them.
Post by Mark
Hi Andy,
You might want to consider the DBGETPROP() function.
hth
Mark
Post by Andy Trezise
Is there a command to retrieve all the tables within a database in to an
array? Similar to AUSED but for ALL tables in the database.
vfpDev@hotmail.com
2004-11-22 13:29:13 UTC
Permalink
Is there a way to read a .DB data (Paradox) from foxpro ??

Thanks
Rick Bean
2004-11-22 13:55:46 UTC
Permalink
Is there an ODBC client or OLE DB provider for Paradox? There is no "native" way for FoxPro to read a .DB file.

Rick
Post by ***@hotmail.com
Is there a way to read a .DB data (Paradox) from foxpro ??
Thanks
Loading...