How to get the database's index information ?

4 posts / 0 new
Last post
Derek
Offline
Joined: 03/29/2016 - 03:10
How to get the database's index information ?

Hi Brian,
If I have a IDEA file and there exist 4 index , have any possible to write a function to get all index information  ?
Thanks,
Derek
 
 

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

Hi Derek,

There is no way that I know of to get the different indexes from IDEAScript.  What are you thinking of doing with them?

Brian

Derek
Offline
Joined: 03/29/2016 - 03:10

Hi Brian,
I notes if the IDEA file have more and more index the file size will become more big. Because we need to keep our project data when we final the project. So I’m thinking if I have a script to determine all IDEA files index and delete then automated , that will reduce the file sizes.
 
Derek

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

There is no way that I know of to get the indices that have been created.  If you are creating them in your script you could probably track them and then delete those indices using the task.DeleteIndex


Sub Main
' Open the database.
Set db = Client.OpenDatabase("Sample-Customers.IMD")
' Create the task.
Set task = db.Index
' Set the index.
task.AddKey "COMPANY", "A"
' Remove the index.
task.DeleteIndex
' Clear the memory.
Set db = Nothing
Set task = Nothing
End Sub