ArcObjects Library Reference  (GeoDatabase)    

IField.Type Property

The type of the field.

[Visual Basic 6.0]
Property Type As esriFieldType
[Visual Basic .NET]
Public ReadOnly Property Type As esriFieldType
[C#]
public esriFieldType Type {get;}
[Java]
public esriFieldType getType()
throws
    IOException,
    AutomationException
[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

The following table outlines the equivalent field data types in ArcCatalog, ArcObjects, Visual Basic and a selection of DBMSs:

ArcCatalog

esriFieldType

(IField::Type)

VB Variable Type

(IField::VarType)

Access SQL Server Oracle
Short Integer esriFieldTypeSmallInteger vbInteger Number (Integer) smallint NUMBER
Long Integer esriFieldTypeInteger vbLong Number (Long Integer) int NUMBER
Float esriFieldTypeSingle vbSingle Number (Single) float NUMBER
Double esriFieldTypeDouble vbDouble Number (Double) float NUMBER
Text esriFieldTypeString vbString Text varchar VARCHAR2
Date esriFieldTypeDate vbDate Date/Time datetime DATE
Object ID esriFieldTypeOID vbLong AutoNumber (Long Integer) int NUMBER(38)
Geometry esriFieldTypeGeometry vbDataObject OLE Object int NUMBER(38) or SDO_GEOMETRY
Blob esriFieldTypeBlob vbObject OLE Object image NUMBER(38) or SDO_GEOMETRY
Raster esriFieldTypeRaster vbDataObject Number (Long Integer) int NUMBER
GUID esriFieldTypeGUID vbString Number (Replication ID) uniqueidentifier CHAR
GlobalID esriFieldTypeGlobalID vbString Number (Replication ID) uniqueidentifier CHAR

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

Example

IField Example

 


Feedback Send feedback on this page