Site hosted by Angelfire.com: Build your free website today!
   
Visual Basic Code Example

The code below is a sub procedure found in the cApplicant class that retrieves the information pertaining to a specific applicant. It requires the Applicant ID from the form that will come from the item data of the selected applicant. The Applicant ID will be passed on to the data broker that in turn will return an array of information through larrGetProfile. The array will fill the mvar's that will be retrieved on the form through this sub procedure.  Note that this sub procedure also takes into account the fact that email and notes are not required fields to be entered on the user interface and allows them to be left empty.

Public Sub GetProfile(ApplicantId As Integer)

Dim larrGetProfile As Variant

larrGetProfile = mApplicantDB.GetProfile(ApplicantId)

     mvarApplicantID = larrGetProfile(0, 0)
     mvarApplicantFName = larrGetProfile(1, 0)
     mvarApplicantLName = larrGetProfile(2, 0)
     mvarPhone = larrGetProfile(3, 0)
     mvarStAddress = larrGetProfile(4, 0)
     mvarCity = larrGetProfile(5, 0)
     mvarStateProvince = larrGetProfile(6, 0)
     mvarZipPostal = larrGetProfile(7, 0)

     If IsNull(larrGetProfile(8, 0)) = True Then
          mvarEmail = ""
     Else
          mvarEmail = larrGetProfile(8, 0)
     End If

     If IsNull(larrGetProfile(9, 0)) = True Then
          mvarNotes = ""
     Else
          mvarNotes = larrGetProfile(9, 0)
     End If

     If larrGetProfile(10, 0) = "True" Then
          mvarAvailabilityStatus = 1
     Else
          mvarAvailabilityStatus = 0
     End If

     mApplicantDB.GetProfile (ApplicantId)

End Sub
 

     




Essentials of eBusiness / Java / Visual Basic / DB2 / Peer Evaluations / Biography