Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how check tables and index of a database

Status
Not open for further replies.

ron9999

Programmer
Feb 14, 2003
89
AT
I try to check the tables and index of my app.
How I thought it could go.

Open the database and check how many tables there
This, I guess will go with DBGETPORP() but I don’t know how
here I need help please.
I don’t know how to write a loop to get all tables out of the databases.

If I have all tables in a array I compare it with a asci file where the tables written.
If a table is missing I create it
Then I check every tables field
and last I check every index of each table
every thing I know how to do except to get the tables of the databases
appreciate every help
Tia
Ron


 
You can open the database as a table and look for the tables there

Code:
use database.dbc again noupdate alias test
go top
scan for objecttype = "Table"

   lcTablename = alltrim(test.objectname)
   
   *your code here

endscan
 
Check out the ADBOJECTS() function. It tells you all about a database.

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top