Specifies the field name that uniquely identifies each object within the collection. As opposed to the ordinal/index position or distinct field, 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 SubsetAttribute has been specified then the key field only needs to be unique within the subset, not the entire table. Specifying this attribute is optional.

Namespace: DatabaseObjects
Assembly: DatabaseObjects (in DatabaseObjects.dll) Version: 3.8.1.0

Syntax

C#
public KeyFieldAttribute(
	string strKeyFieldName
)
Visual Basic
Public Sub New ( _
	strKeyFieldName As String _
)
Visual C++
public:
KeyFieldAttribute(
	String^ strKeyFieldName
)

Parameters

strKeyFieldName
Type: System..::..String

[Missing <param name="strKeyFieldName"/> documentation for "M:DatabaseObjects.KeyFieldAttribute.#ctor(System.String)"]

See Also