Results 1 to 2 of 2

Thread: How to REMOVE an index

  1. #1

    Thread Starter
    Join Date
    Sep 2005
    Baker, Louisiana

    Question How to REMOVE an index

    I'm using VB6 and trying to delete a column from an access database. I received and error stating that it can't be deleted because it is indexed. Can anyone help me with removing this index programmatically. Thanks in advance for any help you are able to give me. Below is the code I was trying.
    VB Code:
    1. "DROP INDEX [localfood#]_IDX ON tblFoodSpecs ([localfood#])": cnn.Execute sql6

  2. #2
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004

    Re: How to REMOVE an index

    I believe the syntax is more like:

    Alter Table tblFoodSpecs Drop Index [localfood#]_IDX

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width