Indicex/index

2 posts / 0 new
Last post
Robert van den ...
Offline
Joined: 08/08/2018 - 07:37
Indicex/index

I got a script to create an index, but IDEA don't set the index, the default is no index, is there a way to force IDEA to use a specific index?
 
 
Function IndexDatabase(DatabaseToBeOpened As String, FieldToBeIndexed As String, IndexKey As String)
Set db = Client.OpenDatabase(DatabaseToBeOpened)
Set task = db.Index
task.AddKey FieldToBeIndexed, IndexKey
task.Index FALSE
Client.CloseDatabase(DatabaseToBeOpened)
Set task = Nothing
Set db = Nothing
End Function

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

If you leave the database open you will keep the index that you just created.