This document is archived and information here might be outdated.  Recommended version.


IQueryName2.PrimaryKey Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IQ > IQueryName2 Interface > IQueryName2.PrimaryKey Property
ArcGIS Developer Help

IQueryName2.PrimaryKey Property

The primary key field names.

[Visual Basic .NET]
Public Property PrimaryKey As String
[C#]
public string PrimaryKey {get; set;}
[C++]
HRESULT get_PrimaryKey(
  BSTR fieldNames
);
[C++]
HRESULT put_PrimaryKey(
  System.String* fieldNames
);
[C++]
Parameters
fieldNames [in]

fieldNames is a parameter of type BSTR fieldNames [out, retval]
fieldNames is a parameter of type BSTR*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

The name of the field or fields to use for assigning Object ID's to the rows in the QueryDef. Provide a comma delimited string of field names for cases where more than one field is needed to provide a unique value for each row (i.e. composite keys)

Always provide fully qualified field names.

See Also

IQueryName2 Interface