Delete HelpTables

1 post / 0 new
CB's picture
CB
Offline
Joined: 10/19/2012 - 04:54
Delete HelpTables

if you make makros where you need to make some extraktions,... you will have some "helping tables"
to get your result.. sorry for my bad english, but hope you understand what i mean or talking about...

when you want to delete these "helping tables" after your result was generated you could do it
this way:

if you make some extraktion call every helping table with the same prefix...
e.g. call them:

dbName = Client.UniqueFileName ("HelpTab_xxxxxxxxx")

after your main programm is finished you could start this sub unit:

Sub Run_HelpTabDel

Dim HelpFiles() As String

ReDim HelpFiles(0)
s = Dir(Client.WorkingDirectory + "HelpTab_*.imd")

While iIsBlank(s) = 0
HelpFiles(UBound(HelpFiles)) = s
s = Dir
If iIsBlank(s) = 0 Then
ReDim Preserve HelpFiles(UBound(HelpFiles)+1)
End If
Wend

For i = 0 To UBound(HelpFiles)
helpTab = Client.WorkingDirectory + HelpFiles(i)
If iIsBlank(HelpFiles(i)) = 0 Then
Client.DeleteDatabase(helpTab)
End If
Next i

End Sub

after this all helping tables are delete and you only have the result table in your idea explorer...and of course all other tables not named like HelpTab_xxxxxxxx.IMD

cheers,
chris