ArcObjects Library Reference (GeoDatabase)  

IField.Type Property

The type of the field.

[Visual Basic .NET]
Public ReadOnly Property Type As esriFieldType
[C#]
public esriFieldType Type {get;}
[C++]
HRESULT get_Type(
  esriFieldType* Type
);
[C++]

Parameters

Type [out, retval]

  Type is a parameter of type esriFieldType

Product Availability

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

Remarks

For more information on the relation between esriFieldType values and the underlying SDE and DBMS data types, see the following articles in the ArcGIS Help:

 

The following table outlines the equivalent field data types in ArcCatalog, ArcObjects and .NET:

ArcCatalog

esriFieldType

(IField::Type)

.NET Variable Type

Short Integer esriFieldTypeSmallInteger System.Int16
Long Integer esriFieldTypeInteger System.Int32
Float esriFieldTypeSingle System.Single
Double esriFieldTypeDouble System.Double
Text esriFieldTypeString System.String
Date esriFieldTypeDate System.DateTime
Object ID esriFieldTypeOID System.Int32
Geometry esriFieldTypeGeometry ESRI.ArcGIS.Geometry.IGeometry
Blob esriFieldTypeBlob ESRI.ArcGIS.esriSystem.IMemoryBlobStream
Raster esriFieldTypeRaster ESRI.ArcGIS.Geodatabase.IRasterValue
GUID esriFieldTypeGUID System.String
GlobalID esriFieldTypeGlobalID System.String

The following table outlines the Coverage, INFO Item to Geodatabase field mapping:

Item type Item width Geodatabase field type (esriFieldType)
B 4 esriFieldTypeInteger
C 1-320 esriFieldTypeString
D 8 esriFieldTypeDate
F 4 esriFieldTypeSingle
F 8 esriFieldTypeDouble
I 1-4 esriFieldTypeSmallInteger
I 5-9 esriFieldTypeInteger
I 10-16 esriFieldTypeDouble
N 1-9 esriFieldTypeSingle
N 10-16 esriFieldTypeDouble

The following table outlines the Shapefile, dBASE field to Geodatabase field mapping:

Field type Field width Geodatabase field type (esriFieldType)
Date - esriFieldTypeDate
String 1-255 esriFieldTypeString
Boolean - esriFieldTypeString
Number 1-16 (decimals = 0) esriFieldTypeInteger
Number 1-16 (decimals > 0) esriFieldTypeDouble
Note: Shapefiles only support date fields. Time is not supported. Geodatabases support date\time fields. If a shapefiles date field is queried for the time a default value of "12:00:00 AM" will be returned.

See Also

IField Interface