internal static ESRI.ArcGIS.Geodatabase.esriFieldType BuildDataType(String theType, int theLength)
{
esriFieldType theRetValue = esriFieldType.esriFieldTypeString;
String lngtString;
theType = theType.ToLower();
try
{
if (theType.StartsWith("string"))
{
lngtString = theType.Substring(7, theType.Length - 8);
theLength = (int)Convert.ToInt32(lngtString);
}
else
{
switch (theType.ToLower())
{
case "integer":
theRetValue = esriFieldType.esriFieldTypeInteger;
break;
case "single":
theRetValue = esriFieldType.esriFieldTypeSingle;
break;
case "double":
theRetValue = esriFieldType.esriFieldTypeDouble;
break;
case "guid":
theRetValue = esriFieldType.esriFieldTypeGUID;
break;
case "smallInteger":
theRetValue = esriFieldType.esriFieldTypeSmallInteger;
break;
case "date":
theRetValue = esriFieldType.esriFieldTypeDate;
break;
}
}
}
catch { theRetValue = esriFieldType.esriFieldTypeString; }
return theRetValue;
}