Dennis' Domino Blog
« Sore loser: Connie Sonne (JREF Challenge at TAM7)Odd: Swearing can reduce the feeling of pain »

Removing a full text index on a server

Permalink 07/13/09 11:42, by Dennis van Remortel, Categories: SNTT, Lotus, Development
I've whipped up this little code after searching the web on how to use the C-api.
It's actually easier then I thought, but I'm sharing it anyway.

'Remove FTI: Declare Function FTDeleteIndex Lib "nnotes.dll" (Byval hDB As Long) As Integer Declare Function NSFDbClose Lib "nnotes.dll" (Byval hDB As Long) As Integer Declare Function NSFDbOpen Lib "nnotes.dll" (Byval filepath As String, DB As Long) As Integer Declare Function OSPathNetConstruct Lib "NNOTES" Alias "OSPathNetConstruct" _ ( Byval NullPort As Long, Byval Server As String, Byval FIle As String, _ Byval PathNet As String) As Integer Sub Initialize Dim Bufferstr As String Dim ReturnCodel As Long Dim hDB As Long Dim errorstr As String Dim pathName As String pathName = String(256, " ") Call OSPathNetConstruct(0, SERVER, PATH, pathName) Dim result As Integer 'open the dataase result = NSFDbOpen(pathName, hDb) If Result <> 0 Then errorstr="An error occurred in the main routine calling the API function NSFDbOpen." & Chr$(10) & "The return code was " & Trim$(Str$(ReturnCodel)) & "." Exit Sub End If 'Delete the index ReturnCodel = FTDeleteIndex(hDB) If ReturnCodel <> 0 Then errorstr="An error occurred in the main routine calling the API function FTDeleteIndex." & Chr$(10) & "The return code was " & Trim$(Str$(ReturnCodel)) & "." Call NSFDbClose(hDB) Exit Sub End If 'Close the database ReturnCodel = NSFDbClose(hDB) End Sub
ls2html was brought to you by nsftools.com

Download the code here: removefti.lss
Yet another Domino/Websphere Admin blog.

About me:
Lotus Notes/Domino Admin
Websphere Commerce Admin
sceptic
critic



Search

XML Feeds

Planet Lotus

blog soft

©2014 by Dennis van Remortel

Contact | Blog template by Asevo | blog tool | dedicated servers | authors