Главная страница | назад

Article #20876: Dropping the Primary Index

Question: I am working with a Access 97 table and I am trying to drop a primary index so I can rebuild the column. I have tried using the SQL commands DROP INDEX PrimaryKey ON Table but it doesn't seem to work. Any suggestions?

Answer: You can try using the TTable->DeleteIndex(AnsiString Name). Although it was not design to drop the primary index, it has worked in some situations.

Note: If you have received an error stating that the index cannot be found, check the index name in SQL explorer and make sure it is what you think it is. MS Access gives the default name of PrimaryKey to the primary index unless you specify another name.

Last Modified: 28-FEB-00