Thanks George.
I put that statements sequence in a prg and run it, but got a
"Class definition sqldmo.sqlserver is not found" error message.
Please note that I don't have SQL Server installed in my PC, perhaps that's the problem, and that's why I need a VFP program do get the indices.
Fernando
>Fernando,
>Don't know about Oracle, but this sort of information is available through SQL-DMO. For example,
oSQLSvr = CREATEOBJECT("sqldmo.sqlserver")
oSQLSvr.Connect('(local)', 'sa', '')
oDatebase = oSQLSvr.Databases('mydatabase')
oTable = oDatebase.Tables('mytable')
oIndexes = oTable.Indexes
? oIndexes.Count
? oIndexes.Item(1).Name
? oIndexes.Item(1).Type
oColumns= oIndexes.Item(1).ListIndexedColumns
? oColumns.Count
? oColumns.Item(1).Name