Sets a user-defined attribute for a member.
Syntax
EsbOtlSetUserAttribute (hOutline, hMember, pszString) ByVal hOutline As Long ByVal hMember As Long ByVal pszString As String
Parameter | Description |
---|---|
hOutline | Outline context handle. |
hMember | Handle of member for which to set the user-defined attribute. |
pszString | User-defined attribute to set. |
Notes
A caller can set any number of user-defined attributes for a member. The string passed in uniquely defines each attribute and follows the same conventions as user names. See EsbOtlGetUserAttributes().
Attempting to set a user attribute for a shared member generates an error.
Return Value
Returns 0 if successful; otherwise one of the following:
OTLAPI_BAD_USERATTR
OTLAPI_ERR_SHAREUDA
Example
Declare Function EsbOtlSetUserAttribute Lib "ESBOTLN" (ByVal hOutline As Long, ByVal hMember As Long, ByVal pszString As String) As Long Sub ESB_OtlSetUserAttribute() Dim sts As Long Dim Object As ESB_OBJDEF_T Dim hOutline As Long Dim hMember As Long Dim AttributeList As String Object.hCtx = hCtx Object.Type = ESB_OBJTYPE_OUTLINE Object.AppName = "Sample" Object.DbName = "Basic" Object.FileName = "Basic" AttributeList = "Read Write" sts = EsbOtlOpenOutline(hCtx, Object, ESB_YES, ESB_YES, hOutline) If sts = 0 Then sts = EsbOtlFindMember(hOutline, "Jan", hMember) End If If sts = 0 And hMember <> 0 Then '******************** ' Set User Attributes '******************** sts = EsbOtlSetUserAttribute(hOutline, hMember, AttributeList) End If End Sub
See Also