remove index from field or delete a indexed field 
Author Message
 remove index from field or delete a indexed field

Hello,
How can I remove the INDEX from a field or delete a indexed field?

When I want to delete my autonumberfield "ID" I get error 3280 "Cannot
delete a field that is part of an index or is needed by the system."

How can I delete this field?

Greatings,Koen



Sun, 14 Aug 2005 00:34:50 GMT  
 remove index from field or delete a indexed field
You can first delete the index, here is a sample:

Dim cn As New ADODB.Connection

cn.Open "provider=microsoft.jet.oledb.4.0;data source=c:\temp\db1.mdb"

Dim cx As New ADOX.Catalog

Set cx.ActiveConnection = cn

cx.Tables("table1").Indexes.Delete 0

Luke

(This posting is provided "AS IS", with no warranties, and confers no
rights.)



Mon, 15 Aug 2005 20:55:07 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Delete Field (with index) programmatically

2. Deleting some of the index fields (in a paragraph style)

3. Adding Field to Access db - need to make indexed property of field No Duplicates

4. Numeric Index of RS.field from field name?

5. Too many indexes - Wierd hidden indexes preventing index add

6. Index of a combination of two fields

7. Change Indexed propety of field

8. Re-Indexing a PK field

9. Code to index a field

10. Adding fields to a table and index

11. Create Index without adding field!!!

12. How to use multi-fields indexes in VBA

 

 
Powered by phpBB® Forum Software