def deleteIndex(self, tab_name, idx_name):
        """
        Delete index by name.
        NB cannot delete an index if a table is locked.
        Or if it is part of a relationship (I would expect).  
        Release (close) it first.
        """
        cat = win32com.client.Dispatch(r'ADOX.Catalog')
        cat.ActiveConnection = self.connAccess
        index_coll = cat.Tables(tab_name).Indexes
        try:
            index_coll.Delete(idx_name)
        except Exception, e:
            raise Exception, "Unable to delete index - if table is " + \
                "locked, make sure you release (close) it first.  " + \
                "Orig error: " + str(e)
        cat = None

        Delete index by name.
        NB cannot delete an index if a table is locked.
        Or if it is part of a relationship (I would expect).  
        Release (close) it first.
        
recipes/Python/528868_Extractimanipulaticlass_Microsoft/recipe-528868.py