Pcdsql – Kofax DM API User Manual
Page 136

116 C
HAPTER
3
PCDSQL
'Set the Library.
If nResult = 0 Then
nResult = oUpdateSQL.
("MyNewLibrary")
Else
MsgBox ("The
call failed.")
End If
'This function does not return a SUCCESS/FAILURE
'value. Instead, it returns the numeric value of
'the DB Vendor.
If nResult = 0 Then
nResult = oUpdateSQL.
Else
MsgBox ("SetLibrary call failed")
End If
'This SQL statement retrieves two columns.
nResult = oUpdateSQL.
( "SELECT “ _
& “USER_ID, FULL_NAME FROM DOCSADM.PEOPLE")
'Load put data from the SELECT into the list Box.
'Then, determine which list box item is in focus.
nNumRows = oUpdateSQL.
'Fill up the ListBox with result set data.
For i = 1 To nNumRows
nResult = oUpdateSQL.
(i)
'Place the User ID in the buffer.
sTempBuf = oUpdateSQL.
(1)
UpdateForm.lstUserIDs.AddItem(sTempBuf)
Next i
'Select the first element in the listbox.
lstUserIDs.Selected(0) = True
'Match the item selected in the list box with
'the data in the textbox.
nResult = oUpdateSQL.
(1)