6.20.1 VB Example
Private Sub lstSkills_Click()
' This subroutine sets the fields displayed to the details of the
' list's currently selected skill
Dim iRet As Integer
Dim sBuff As String
Dim lFlags As Long
Dim lDataLen As Long
If (lstSkills.ListIndex > -1) Then ' selected
' Read record
' set key
iRet = LceSetFieldValue(iSession, "SKILCODE", _
SkillKey(lstSkills.ListIndex))
' fetch record
iRet = LceFetch(iSession, "SKILCODE,SKILDESC", "SKLTAB", _
"SKILCODE") ' Get Record
' get data and set fields
' get code
iRet = LceGetFieldDataLength(iSession, "SKILCODE", lDataLen)
sBuff = String(lDataLen + 1, Chr(0))
iRet = LceGetFieldValueX(iSession, "SKILCODE", sBuff, lFlags) ' Get Field
txtCode = sTrim(sBuff) ' display data
' get description
iRet = LceGetFieldDataLength(iSession, "SKILDESC", lDataLen)
sBuff = String(lDataLen + 1, Chr(0))
iRet = LceGetFieldValueX(iSession, "SKILDESC", sBuff, lFlags)
txtDesc = sTrim(sBuff)
End If
End Sub