Retrieves the nth member from the member combination list of the current LRO.
Syntax
EsbLROGetMemberCombo (hCtx, memberIndex, memberName) ByVal hCtx As ESB_HCTX_T ByRef memberIndex As ESB_ULONG_T ByVal memberName As ESB_MBRNAME_T
| Parameter | Description |
|---|---|
hCtx | VB API context handle. |
memberIndex | Position in the member list of the member to be returned. |
memberName | Returned member's name. |
Notes
EsbLROGetMemberCombo() returns the member combination (that identifies the data cell associated with the linked object) which memComb in ESB_LRODESC_API_T fails to return.
To ensure that the list in memory associated with hCtx is a list of LROs, call EsbLROListObjects() or EsbLROGetObject() before you call EsbLROGetMemberCombo().
After you call EsbLROListObjects(), you must call EsbGetNextItem(). ESbLROGetMemberCombo() then operates on the current LRO fetched by EsbGetNextItem().
You can still use memCount in ESB_LRODESC_API_T to find the number of member names in the member combination identifying the data cell. See Example.
Return Value
If successful, returns a member in memberName. If fails, returns -1 to indicate the current object is not an LRO type, or 1 to indicate out of bounds. Out of bounds means either there is no member at the memberIndex position, or there is no LRO at the current item. See Notes.
Access
This function requires no special privileges.
Example
Declare Function EsbLROGetMemberCombo Lib "ESBAPIN" (ByVal hCtx As Long, _
ByVal MemberIndex As Long, ByVal MemberName As String * ESB_MBRNAMELEN) As Long
Sub ESB_LROGetMemberCombo()
Dim userName As String * ESB_USERNAMELEN
Dim listDate As Long
Dim Count As Integer
Dim Desc As ESB_LRODESC_API_T
Dim i As Integer
Dim j As Integer
Dim CutOffDate As Date
Dim MemberName As String * ESB_MBRNAMELEN
Const ESB_REFERENCE_DATE = #1/1/70#
userName = "admin"
CutOffDate = #8/1/97#
listDate = DateDiff("s", CutOffDate, ESB_REFERENCE_DATE)
sts = EsbLROListObjects(hCtx, userName, listDate, Count)
If sts = 0 Then
For i = 1 To Count
'**************************************
'* Get the next LRO item from the list
'**************************************
sts = EsbGetNextItem(hCtx, ESB_LRO_TYPE, Desc)
If sts = 0 Then
For j = 1 To Desc.memCount
'*************************************************************
'* Get the jth member from the member list of the current LRO
'*************************************************************
sts = EsbLROGetMemberCombo(hCtx, j, MemberName)
Next j
Next i
End If
End SubSee Also