Pcdlookup – Kofax DM API User Manual

Page 85

Advertising
background image

DM API O

BJECTS

65

PCDLookup

'Unsorted. This assures unsorted results, but

'it may not be required unless there were

'previous searches.

objPCDLookup.

ClearOrderByProperties

End Select

'Set the maximum number of records search returns.

objPCDLookup.

SetMaxRows

500

'Set the number of records to be returned at

'one time to user’s local cache.

objPCDLookup.

SetChunkFactor

10

'Execute the lookup

objPCDLookup.

Execute

If objPCDLookup.

ErrNumber

<> 0 Then

'Error: process it.

End If

'Get the information from the result set

Dim intColCount As Integer

Dim lngRowsFound As Long, lngMetaFound As Long

'Get the number of data rows found by the lookup.

lngRowsFound = objPCDLookup.

GetRowsFound

MsgBox "The search returned " _

& CStr( lngRowsFound ) & " rows of data."

'Get the number of metadata rows lookup found.

lngMetaFound = objPCDLookup.

GetMetaRowsFound

MsgBox "The search returned " _

& CStr( lngMetaFound ) & " rows of metadata."

'Get the number of columns in the result data set.

intColCount = objLookup.

ColumnCount

MsgBox "The search result data set contains " _

& CStr( intColCount ) & " columns of data."

'Clear the result set list box (if needed).

Advertising