[AccessD] Indexes

Stuart McLachlan stuart at lexacorp.com.pg
Fri Jun 2 09:19:30 CDT 2006


On 2 Jun 2006 at 13:25, Martin Reid wrote:

> I want to loop over all tables  in a database and get the Index name and
> length. I can get the tables ok but cant seem to get the index length.
> 

AFAIK, there is no way to get the "length" of an index.  There is certainly 
no property in DAO or ADO to return it.  Neither the Field.FieldSize nor 
the Field.Size properties are valid with an Index field.

A lot would depend on exactly how Access stores indexes and I suspect that 
information is proprietary.  In particular, I doubt that the indexing 
scheme for text fields uses a fixed length based on the maximum length of a 
text field, it's more likely to be storing some hash of the the text, so 
even tracking back to the TableDef.Fields collection and the lengths of the 
individual fields in the index is unlikely to return the correct answer.










-- 
Stuart





More information about the AccessD mailing list