The ObjectReference type exposes the following members.

Constructors

  Name Description
Public method ObjectReference(DatabaseObjects)
Initializes the class with the collection that the object is contained within.
Public method ObjectReference(Database, IDatabaseObjects)
Initializes the database and collection class that the object is contained within.

Methods

  Name Description
Public method Equals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected method Finalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public method GetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected method MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public method ObjectSetToOrdinalFirst
Indicates that the first the object in collection should be loaded. After this call the Object property will return this first object. Specifically, this function calls Database.ObjectByOrdinalFirst().
Public method ToString
Returns a String that represents the current Object.
(Inherited from Object.)

Properties

  Name Description
Public property DistinctValue
Sets or returns the distinct value of the object. If Object returns Nothing then Nothing is returned. Simulates using Me.Object.DistinctValue except that loading of the associated object is avoided if the Me.Object get property had not been called and the object loaded from the database. If the ObjectReference class is used with the FieldMapping attribute then this property is set and read automatically when respectively loading and saving the object. See Example 1 below for details.
Public property Object
Sets or returns the referenced object. When reading the value, if the object has not already been loaded then the object is loaded. On subsequent calls the already loaded object is returned.
Public property ObjectIsNothing
Returns whether the Object property would return Nothing. This property can be used rather than calling Me.Object Is Nothing as it avoids unnecessarily loading the associated object if the object had not been loaded from the database.

See Also