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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extracting Table Index SQL

Status
Not open for further replies.

paulkeys

Programmer
Sep 21, 2006
80
Hi,

I am upgrading a few access tables into SQL 2000, and wondered if anyone knew an easy way of extracting the index creation sql for each of the tables within the database.

Any guidance most appreciated.

Thanks
 
I thought that the upsize wizard created the indexes? Do you wish to obtain a list of indexes in the Access database?

Code:
Dim db As Database
Dim idx As Index
Dim tdf As TableDef

Set db = CurrentDb
For Each tdf In db.TableDefs
    For Each idx In tdf.Indexes
        Debug.Print tdf.Name; "  "; idx.Name; "  "; idx.Fields
    Next
Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top