GetKeywordList

Returns the list of all the keywords depending upon criteria.

Public Function GetKeywordList(ByVal PrefixStr As String, ByVal AuthoriseFlag As String, ByVal AliasAlso As String, ByVal StartPos As Long, ByVal FetchCount As Long, ByRef RetrievedRecCount As Long, ByRef TotalRecCount As Long,
ByRef KeywordList() As Byte) As Long

 

Parameters

In/out

Name

Data type

Description

In

PrefixStr

String

Prefix ,if keywords has to be searched on prefix

In

AuthoriseFlag

String

If authorize keywords have to searched

In

AliasAlso

String

Whether to fetch aliases also

In

StartPos

Long

Starting position

In

FetchCount

Long

Number of keyword to be fetched in each batch

Out

RetrievedRecCount

Long

Keywords retrieved count

Out

TotalRecCount

Long

Count of total records fetched

Out

KeywordList

Byte[TagKeyword]

List of keywords fetched

 

Description

This function is called from admin for shared cabinet and from desktop for local cabinet. It is used to fetch all keyword created in a particular Cabinet. When there are still more keywords than the 'fetchcount' specified, then value of 'RetrievedRecCount' is returned greater than 'FetchCount'. If return value of 'RetrievedRecCount' is less than or equal to 'FetchCount' then this means that there are no more keywords remaining to be fetched. After making the first call ,in all remaining calls, returned value of 'TotalRecCount' in the previous call has to be set to 'StartPos' in making a call for more keywords. This is how the concept of batching can be implemented.

 

Return value

Name

Description

 1

In case of success

-3

Cabinet not connected

 

Example

Dim PrefixStr                      As String

Dim AuthoriseFlag               As String

Dim AliasAlso                     As String

Dim StartPos                      As Long

Dim FetchCount                  As Long

Dim RetrievedRecCount       As Long

Dim TotalRecCount             As Long

Dim KeywordList()               As Byte

Dim gPDb                          As PanDb.pdbCls


Set gPDb = New PanDb.pdbCls

PrefixStr = “”

AuthoriseFlag = “L”

AliasAlso = “Y”

StartPos = 0

FetchCount = 10

lRetVal=gPDb.GetKeyWordList(PreFixStr,AuthoriseFlag,AliasAlso,StartPos,FetchCount,RetrievedRecCount,TotalRecCount,KeyWord)

if lRetVal <> NG_SUCCESS Then

    MsgBox gPDb.ErrDescription, vbInformation

     Screen.MousePointer = vbNormal

Endif