Checking number of index files in ADO

R

Rob Hofkens

Hello all :)
I like to check a table if it has one or more index files.
If there is none I like to create them.
This is an example for normal mdb.

Dim db As Database
Dim tbl As TableDef
Set db = CurrentDb
Set tbl = db.TableDefs("SomeTable")

If tbl.Indexes.Count > 0 Then
db.Execute "CREATE INDEX Primary ON SomeTable (PrimaryID)"
End If

I want to convert it to be use with SQL Server 7 useing ADO.
Anyone knows how to do it ?

Thx in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top