1.4 Entry Object

Provides information about the Bindery database such as an object’s name, ID, and network address.

1.4.1 Address property

Contains the network address if the Bindery object is of the server type.

Syntax

 object.Address
 

Type

NetAddress.

Attributes

Read-only.

Example

This example contains the network address if the Bindery object is of the server type.

 ’Display information about all the objects in Bindery 
 set bindery = CreateObject ("ucx:Bindery") 
 set entries=bindery.Search ("*.*") 
 entries.Reset() 
 while (entries.HasMoreElements()) 
 entry=entries.Next() 
 Print (entry.Address.node) 
 wend
 

1.4.2 Fields property

Returns the Bindery object properties collection.

Syntax

 object.Fields
 

Type

Fields.

Attributes

Read-only.

Example

This example returns the Bindery object properties collection.

 ’Display any one property name of the object Testuser 
 set bindery = CreateObject ("ucx:Bindery") 
 set entry=bindery.Element ("Testuser") 
 Fields =entry.Fields 
 Fields.Reset 
 property=Fields.Next() 
 Print (property.Name)
 

1.4.3 Flag property

Indicates the state of the Bindery record. The state can be either static or dynamic.

Syntax

 object.Flag
 

Type

Integer.

Attributes

Read-only.

Remarks

See Object State Constants.

Example

This example indicates the state of the Bindery record. This state can be either static or dynamic.

 ’Display information about all the objects in Bindery 
 set bindery = CreateObject ("ucx:Bindery") 
 set entries=bindery.Search ("*.*") 
 entries.Reset() 
 while (entries.HasMoreElements()) 
 entry=entries.Next() 
 Print (entry.Flag) 
 wend
 

1.4.4 ID property

Returns the ID of the Bindery record.

Syntax

 object.ID
 

Type

Long.

Attributes

Read-only.

Example

This example returns the ID of the Bindery record.

 ’Display information about all the objects in Bindery 
 set bindery = CreateObject ("ucx:Bindery") 
 set entries=bindery.Search ("*.*") 
 entries.Reset() 
 while (entries.HasMoreElements()) 
 entry=entries.Next() 
 Print (entry.ID) 
 wend
 

1.4.5 Name property

Sets the name of the Bindery object.

Syntax

 object.Name=[Value As String]
 

Type

String.

Attributes

Read/write.

Remarks

Value is an optional parameter that sets the new name of the Bindery object.

Example

This example sets the name of the Bindery record.

 ’Display information about all the objects in Bindery 
 set bindery = CreateObject ("ucx:Bindery") 
 set entries=bindery.Search ("*.*") 
 entries.Reset() 
 while (entries.HasMoreElements()) 
 entry=entries.Next() 
 Print (entry.Name) 
 wend
 

1.4.6 SecurityRead property

Sets or returns the security level required to read the Bindery object information.

Syntax

 object.SecurityRead
 

Type

Integer.

Attributes

Read/write.

Remarks

See Security Constants.

Example

This example returns the security level required to read the object information.

 ’Display information about all the objects in Bindery 
 set bindery = CreateObject ("ucx:Bindery") 
 set entries=bindery.Search ("*.*") 
 entries.Reset() 
 while (entries.HasMoreElements()) 
 entry=entries.Next() 
 Print (entry.SecurityRead) 
 wend
 

1.4.7 SecurityWrite property

Sets or returns the security level required to change the Bindery object information.

Syntax

 object.SecurityWrite
 

Type

Integer.

Attributes

Read/write.

Remarks

See Security Constants.

Example

This example returns the security level required to change the object information.

 ’Display information about all the objects in Bindery 
 set bindery = CreateObject ("ucx:Bindery") 
 set entries=bindery.Search ("*.*") 
 entries.Reset() 
 while (entries.HasMoreElements()) 
 entry=entries.Next() 
 Print (entry.SecurityWrite) 
 wend
 

1.4.8 Type property

Returns and sets the type of the Bindery object.

Syntax

 object.Type
 

Type

Integer.

Attributes

Read/write.

Remarks

See Object Type Constants.

Example

This example returns the type of the Bindery object.

 ’Display information about all the objects in Bindery 
 set bindery = CreateObject ("ucx:Bindery") 
 set entries=bindery.Search ("*.*") 
 entries.Reset() 
 while (entries.HasMoreElements()) 
 entry=entries.Next() 
 Print (entry.Type) 
 wend
 

1.4.9 AddFieldMember method

Adds the object information to the Bindery object field.

Syntax

 object.AddFieldMember(
       FieldName As String, 
       ObjName As String, 
       ObjType As Integer)
 

Parameters

FieldName
The name of the set property to which the object will be added. See FieldName Types.
ObjName
The name of the object to be added to the member list of the Set property.
ObjType
The object type. See Object Type Constants.

Return Values

Boolean. Returns TRUE if successful, else returns FALSE.

Example

This example sets the security rights of the user TestUser equal to the security rights of the Admin.

 ’Make the security of TestUser equal to that of Admin 
 Set bindery = CreateObject ("ucx:Bindery") 
 Set Entry=bindery.Element ("TestUser") 
 entry.AddFieldMember ("SECURITY EQUALS" , "Admin", NET_USER)
 

1.4.10 DeleteFieldMember method

Deletes the object information from the Bindery object field.

Syntax

 object.DeleteFieldMember(
       FieldName As String, 
       ObjName As String, 
       ObjType As Integer)
 

Parameters

FieldName
The name of the Set property that contains the object. See FieldName Types.
ObjName
The name of the object to be deleted from the member list of the Set property.
ObjType
The object type. See Object Type Constants.

Return Values

Boolean. Returns TRUE if successful, else returns FALSE.

Example

This example deletes the specified object information from Admin.

 ’Make the security of TestUser equal to Admin by removing Admin from this property set 
 Set bindery = CreateObject ("ucx:Bindery") 
 Set Entry=bindery.Element ("TestUser") 
 entry.DeleteFieldMember ("SECURITY EQUALS" , "Admin", NET_USER) 
 Print "The specified fields have been removed."
 

1.4.11 FieldMemberExist method

Determines whether the object exists as a Bindery object property.

Syntax

 object.FieldMemberExist(
       FieldName As String, 
       ObjName As String, 
       ObjType As Integer)
 

Parameters

FieldName
The name of the Set property. See FieldName Types.
ObjName
The name of the object to be searched in the member list of the Set property.
ObjType
The object type. See Object Type Constants.

Return Values

Boolean. Returns TRUE if the object exists as a Bindery object property, else returns FALSE.

Example

This example determines whether TestUser has security rights equivalent to Admin.

 ’Check whether the TestUser has security rights equivalent to Admin 
 Set bindery = CreateObject ("ucx:Bindery") 
 Set Entry=bindery.Element ("TestUser") 
 If ( entry.FieldMemberExist ("SECURITY EQUALS" , "Admin", NET_USER)) Then 
      Print "TestUser has security rights equivalent to Admin 
 Else 
      Print "TestUser does not have security rights equivalent to Admin." 
 End If
 

1.4.12 Update method

Completes the changes made to the read/write fields.

Syntax

 object.Update()
 

Parameters

None.

Return Values

Boolean. Returns TRUE if successful, else returns FALSE.

Example

This example completes the changes made to the read/write fields.

 ’Change the name of the object: TestUser 
 Set bindery = CreateObject ("ucx:Bindery") 
 Set Entry=bindery.Element ("TestUser") 
  
 ’Change the object name 
 Entry.name = "newTestUser" 
 Entry.Update() 
 Print Entry.Name 
  
 ’Reset the name 
 Entry.name = "TestUser" 
 Entry.Update() 
 Print Entry.Name