ArcObjects Library Reference (GeoDatabase)  

IField Interface

Provides access to members that return information about the field. Note: the IField interface has been superseded byIField2. Please consider using the more recent version.

Product Availability

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

Description

The field object represents a column in a table. A field has many properties, the most obvious ones being its name and its datatype. The esriFieldType enumeration lists the possible datatypes.

Members

Description
Read-only property AliasName The alias name of the field.
Method CheckValue Indicates if the value is valid given the field definition.
Read-only property DefaultValue The default value of the field.
Read-only property Domain The default domain of the field.
Read-only property DomainFixed Indicates if the field's domain is fixed.
Read-only property Editable Indicates if the field is editable.
Read-only property GeometryDef The geometry definition for the field if IsGeometry is TRUE.
Read-only property IsNullable Indicates if the field can contain null values.
Read-only property Length The maximum length, in bytes, for values described by the field.
Read-only property Name The name of the field.
Read-only property Precision The precision for field values.
Read-only property Required Indicates if the field is required.
Read-only property Scale The scale for field values.
Read-only property Type The type of the field.
Read-only property VarType The VARTYPE of the field (e.g. VT_I4).

CoClasses that implement IField

CoClasses and Classes Description
Field ESRI Field object.

Remarks

When you create a field of type esriFieldTypeSingle, esriFieldTypeDouble or esriFieldTypeInteger, and specify zero for precision and scale, the geodatabase will attempt to create a binary type field if the underlying database supports it. Personal geodatabases support only binary type fields.  ArcGIS ignores precision and scale of binary type fields.

The length property of a field has meaning only for esriFieldTypeString fields. The length property for all other field types is not important and will be ignored if specified.

.NET Snippets

Write Blob Field Contents To File | Create FeatureClass | Create Table | Write Blob File Contents To Table Row Field |

.NET Samples

ArcGIS GPConsole (Code Files: Program) | Bind a geodatabase table to a .NET control (Code Files: FieldPropertyDescriptor TableWrapper) | Calculate area geoprocessing function tool (Code Files: CalculateAreaFunction) | Convert part to feature command (Code Files: ConvertPart) | Create a custom raster type (Code Files: ThumbnailBuilder) | Displaying MapTips in the MapControl (Code Files: MapTips) | Export any network analysis class to a text file (Code Files: NAClassToTextfileCmd) | Find the closest intersection from a point (Code Files: FindClosestIntersection) | Geoprocessing field mapping (Code Files: FieldMapping) | Import signposts (Code Files: SignpostUtilities) | Retrieve a color ramp from the SymbologyControl (Code Files: SymbolForm) | Route application using the NAServer extension in ArcGIS Server via a GIS client (Code Files: Route_GISClientClass) | Server spatial query COM utility (Code Files: VegUtils_VBNet) | Server spatial query server object extension (Code Files: Configurator Extension) | Simple point plug-in data source (Code Files: SimplePointCursor SimplePointDataset) | Single line address geocoding (Code Files: SingleLineGeocodingForm) | StreetMap routing (Code Files: RoutingForm) | Timestamper class extension (Code Files: TimestampClassDescription TimestampClassExtension TimestampPropertyPage) |

.NET Related Topics

Assigning domains to fields | Building a custom geoprocessing function tool | Converting simple data | Copying or loading data while preserving GlobalID values | Creating a plug-in data source | Creating an address locator | Creating annotation and dimension feature classes | Creating class extensions | Creating feature classes | Creating fields | Creating indexes | Creating relationship classes | Creating tables | Geodatabase API best practices | Geometry | Geoprocessing services | Getting a list of schema differences between replicas | How to create SOE property pages | How to develop the SOE | How to find the address closest to a point using reverse geocoding | How to geocode a single address | How to geocode a table of addresses | How to standardize an address | How to work with geocoding properties | Migrating VB6 to VB.NET for ArcGIS 10 | Updating geometry of existing features | Using schema locks | Working with fields | Working with indexes |