Pcdsql – Kofax DM API User Manual

Page 132

Advertising
background image

112 C

HAPTER

3

PCDSQL

nResult = oSelectSQL.

ReleaseResults

()

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.

Execute

("SELECT USER_ID, _

FULL_NAME FROM DOCSADM.PEOPLE")

'Retrieve column count from the result set.

nColumnCount = oSelectSQL.

GetColumnCount

()

'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.

GetColumnCount

(i)

Next i

'Get number of rows in the result set.

nNumRows = oSelectSQL.

GetRowCount

()

'Populate the two lists with data returned in

'the result set.

For i = 1 To nNumRows

nResult = oSelectSQL.

SetRow

(i)

For j = 1 To nColumnCount

lstReturnedData(j - 1).AddItem( _

Advertising