Gets a value indicating whether the Table has a geodatabase-managed, unique identifier column. Typically this is the OBJECTID column for geodatabase tables/feature classes, the FID column for shapefiles and OID column for dBase tables.

Namespace:  ESRI.ArcGISExplorer.Data

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)

Syntax

C#
public bool HasObjectIDColumn { get; }
Visual Basic (Declaration)
Public ReadOnly Property HasObjectIDColumn As Boolean

Field Value

trueTruetruetrue (True in Visual Basic) if the Table contains a geodatabase-managed, unique identifier column; otherwise, falseFalsefalsefalse (False in Visual Basic).

Remarks

This property is also available on the ColumnCollection.

Examples

The code below returns an individual record from a file geodatabase feature class then accesses the Row object properties including a check to ensure that the Table has an OBJECTID column.
CopyC#
//Open Montgomery file geodatabase
Geodatabase gdb = new Geodatabase(@"C:\Data\Montgomery.gdb");

//Open the parcels featureclass
Table parcels = gdb.OpenTable("parcels");

//Get a single parcel by property ID
Row row = parcels.Search(new Filter("PROPERTY_I = 4704")).GetFirst();

//Print out some properties of the row
System.Diagnostics.Debug.Print(row.HasObjectIDColumn.ToString());   //Prints "True"
System.Diagnostics.Debug.Print(row.ObjectID.ToString());            //Prints "3704"
System.Diagnostics.Debug.Print(row.Table.Name);                     //Prints "parcels"

//Get the area of this parcel
System.Diagnostics.Debug.Print(row.Values[parcels.Columns.AreaColumnName].ToString()); //Prints "12815.4"

//Return the geometry of the parcel from the row
Polygon poly = row.Geometry as Polygon;

//Call ToString() on the polygon to print summary geometry information
System.Diagnostics.Debug.Print(poly.ToString());    //Prints "Polygon: Point count = 7 Ring count = 1"

//Get the area of this parcel from the geometry
System.Diagnostics.Debug.Print(poly.Area.ToString());               //Prints "12815.4"
CopyVB.NET
'Open Montgomery file geodatabase
Dim gdb As Geodatabase = New Geodatabase("C:\Data\Montgomery.gdb")

'Open the parcels featureclass
Dim parcels As Table = gdb.OpenTable("parcels")

'Get a single parcel by property ID
Dim r As Row = parcels.Search(New Filter("PROPERTY_I = 4704")).GetFirst()

'Print out some properties of the row
System.Diagnostics.Debug.Print(r.HasObjectIDColumn.ToString())   'Prints "True"
System.Diagnostics.Debug.Print(r.ObjectID.ToString())            'Prints "3704"
System.Diagnostics.Debug.Print(r.Table.Name)                     'Prints "parcels"


'Get the area of this parcel
System.Diagnostics.Debug.Print(r.Values.Item(parcels.Columns.AreaColumnName).ToString()) 'Prints "12815.4"


'Return the geometry of the parcel from the row
Dim poly As Polygon = r.Geometry

'Call ToString() on the polygon to print summary geometry information
System.Diagnostics.Debug.Print(poly.ToString())    'Prints "Polygon: Point count = 7 Ring count = 1"


'Get the area of this parcel from the geometry
System.Diagnostics.Debug.Print(poly.Area.ToString())             'Prints "12815.4"

See Also