
116 CHAPTER 3
PCDSQL
'Set the Library.
If nResult = 0 Then
nResult = oUpdateSQL.SetLibrary("MyNewLibrary")
Else
MsgBox ("The SetDST 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.GetDBVendor()
Else
MsgBox ("SetLibrary call failed")
End If
'This SQL statement retrieves two columns.
nResult = oUpdateSQL.Execute( "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.GetRowCount()
'Fill up the ListBox with result set data.
For i = 1 To nNumRows
nResult = oUpdateSQL.SetRow(i)
'Place the User ID in the buffer.
sTempBuf = oUpdateSQL.GetColumnValue(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.SetRow(1)
Kommentare zu diesen Handbüchern