Database Objects
Hi-Integrity Systems
HomeVB6 Documentation › IDatabaseObjects.KeyFieldName

IDatabaseObjects

IDatabaseObjects_KeyFieldName As String

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 need only to be unique within the specified subset, not the entire table. Implementing this function is optional.

'Products class Private Function IDatabaseObjects_KeyFieldName() As String 'Each Product is uniquely identified by the ProductCode field IDatabaseObjects_KeyFieldName = "ProductCode" End Function

This interface function/property is utilised by the following functions:
ObjectByKey, ObjectExists