Pcdsql – Kofax DM API User Manual
Page 132

112 C
HAPTER
3
PCDSQL
nResult = oSelectSQL.
Unload SelectForm
End Sub
Private Sub cbSelect_Click()
'Local Variable Declarations.
Dim nNumRows As Long
Dim nColumnCount As Long
Dim nResult As Long
Dim sTempBuf As String
'Run a simple Query to return a couple of
'columns of data.
nResult = oSelectSQL.
("SELECT USER_ID, _
FULL_NAME FROM DOCSADM.PEOPLE")
'Retrieve column count from the result set.
nColumnCount = oSelectSQL.
'Insert the names of the respective columns
'into the labels above the list boxes containing
'result set data.
For i = 1 To nColumnCount
lblColumnName(i - 1).Caption = _
oSelectSQL.
(i)
Next i
'Get number of rows in the result set.
nNumRows = oSelectSQL.
'Populate the two lists with data returned in
'the result set.
For i = 1 To nNumRows
nResult = oSelectSQL.
(i)
For j = 1 To nColumnCount
lstReturnedData(j - 1).AddItem( _