Sub build_list
Dim i, i2 As Int
Dim Cursor1 As Cursor
Dim txt As String
Dim key_word() As String
txt="SELECT keywords FROM qa WHERE keywords<>'' ORDER BY keywords"
Cursor1=sql1.ExecQuery(txt)
If Cursor1.RowCount=0 Then
Msgbox("No Keywords","Error")
Else
keywords.Initialize
For i=0 To Cursor1.RowCount-1
Cursor1.Position=i
txt=Cursor1.GetString("keywords")
key_word=Regex.Split(",",txt)
For i2=0 To key_word.Length-1
keywords.add(key_word(i2).ToLowerCase)
Next
Next
keywords.sort(True)
i=0
Do Until i=keywords.Size-1
txt=keywords.Get(i)
If i>0 Then
If txt=keywords.Get(i-1) Then
keywords.RemoveAt(i)
End If
End If
Log(i)
Log(keywords.Size-1)
i=i+1
Loop
Log(txt)
Msgbox(keywords,"FAQ's")
Cursor1.Position=0
Cursor1.Close
End If
End Sub