The IDatabaseObjects type exposes the following members.

Methods

  Name Description
Public method DistinctFieldAutoAssignment
Should return whether the Distinct field as specified in the associated collection's IDatabaseObject.DistinctField is an identity (Autonumber in Microsoft Access) or is a unique identifier field. If set to either value then the IDatabaseObject.DistinctValue value is automatically set when a new object is saved. This function takes precedence over the obsolete DistinctFieldAutoIncrements() and should be used instead of DistinctFieldAutoIncrements. Returning true from DistinctFieldAutoIncrements is logically equivalent to returning SQL.FieldValueAutoAssignmentType.AutoIncrement from DistinctFieldAutoAssignment. However, if DistinctFieldAutoIncrements returns true and DistinctFieldAutoAssignment returns SQL.FieldValueAutoAssignmentType.None then DistinctFieldAutoIncrements is used.
Public method DistinctFieldAutoIncrements Obsolete.
Obsolete - use DistinctFieldAutoAssignment instead. This function is subordinate to DistinctFieldAutoAssignment and should only be used for backwards compatibility. Should return whether the Distinct field as specified in the associated collection's IDatabaseObject.DistinctField is an identity (SQL Server) or autonumber (Microsoft Access) field. If set to true, then the IDatabaseObject.DistinctValue value is set when a new object is saved.
Public method DistinctFieldName
Should return the field name that uniquely identifies each object within the collection. Typically, this is the field name of an identity or auto increment field. If the IDatabaseObjects.SubSet function has been implemented then the DistinctFieldName need only be unique within the subset not the entire table. The DistinctFieldName and KeyFieldName can be identical. This function should almost always be implemented.
Public method ItemInstance
Should return an instance of the class that is associated with this collection of objects. The associated class must implement the IDatabaseObject interface.
Public method KeyFieldName
This property should return the field name that uniquely identifies each object within the collection. As opposed to the ordinal/index position, the key field provides another method of accessing a particular object within the collection. The key field must be unique within the collection. If the IDatabaseObjects.Subset function has been implemented then the key field only needs to be unique within the specified subset, not the entire table. Implementing this function is optional.
Public method OrderBy
Should return an SQLSelectOrderByFields object containing the list of fields the collection will be sorted by. Just as with an SQL statement, the order of the fields added to the collection indicates the group sorting. If IDatabaseObjects.TableJoins has been implemented then fields from the adjoining table or tables can be utilized. The sort order is used by the ObjectByOrdinal, ObjectByOrdinalFirst and ObjectsSearch functions. Should return Nothing if no ordering is required. Implementing this function is optional.
Public method Subset
Should return the conditions that define the collection's subset. If the collection should include the entire table then this function should return Nothing. Implementing this function is optional.
Public method TableJoins
Should return an SQLSelectTableJoins object containing the table or tables to be joined to the primary table. This function is useful in optimising database loading speeds by allowing multiple tables to be joined into one data set. The resultant data set can then be used to load objects from the associated tables avoiding subsequent SQL calls. For a complete example, see the demonstration program. Should return Nothing if no table joins are required. Implementing this function is optional.
Public method TableName
Should return the name of the table associated with this collection. This function should almost always be implemented.

See Also