<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Accessing the FieldType in File Geodatabase API Questions</title>
    <link>https://community.esri.com/t5/file-geodatabase-api-questions/accessing-the-fieldtype/m-p/457896#M775</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Maybe I'm looking at this wrong, but I have looked over the docs and can't find any further info on FieldType, except that it's a parameter to FieldInfo::GetFieldType().&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
FieldInfo fInfo;
table.GetFieldInformation(fInfo);
int count = 0;
fInfo.GetFieldCount(count);
wstring fieldNames = L"";
for (int x = 0; x &amp;lt; count; x++)
{
 wstring f = L"";
 fInfo.GetFieldName(x, f);
 fieldNames.append(f);
 FieldType fType;
 fInfo.GetFieldType(x, fType);
 fieldNames.append(L", ");
}
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically, what I'm trying to do is get the names of each field and the field type.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When I test something like this out in a sample app, I can do&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
wcout &amp;lt;&amp;lt; fType &amp;lt;&amp;lt; endl;
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;I get an integer, which I am guessing coincides with an something like esriIntegerType, but are there methods to FieldType, like toString() or something to get that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm new to C++ and I'm just a little confused on how to use this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Sep 2011 01:36:31 GMT</pubDate>
    <dc:creator>ReneRubalcava</dc:creator>
    <dc:date>2011-09-01T01:36:31Z</dc:date>
    <item>
      <title>Accessing the FieldType</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/accessing-the-fieldtype/m-p/457896#M775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Maybe I'm looking at this wrong, but I have looked over the docs and can't find any further info on FieldType, except that it's a parameter to FieldInfo::GetFieldType().&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
FieldInfo fInfo;
table.GetFieldInformation(fInfo);
int count = 0;
fInfo.GetFieldCount(count);
wstring fieldNames = L"";
for (int x = 0; x &amp;lt; count; x++)
{
 wstring f = L"";
 fInfo.GetFieldName(x, f);
 fieldNames.append(f);
 FieldType fType;
 fInfo.GetFieldType(x, fType);
 fieldNames.append(L", ");
}
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically, what I'm trying to do is get the names of each field and the field type.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When I test something like this out in a sample app, I can do&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
wcout &amp;lt;&amp;lt; fType &amp;lt;&amp;lt; endl;
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;I get an integer, which I am guessing coincides with an something like esriIntegerType, but are there methods to FieldType, like toString() or something to get that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm new to C++ and I'm just a little confused on how to use this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2011 01:36:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/accessing-the-fieldtype/m-p/457896#M775</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2011-09-01T01:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the FieldType</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/accessing-the-fieldtype/m-p/457897#M776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Nevermind. I found it. It's an Enum in FileGDBCore.h&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
enum FieldType
{
&amp;nbsp; fieldTypeSmallInteger =&amp;nbsp; 0,
&amp;nbsp; fieldTypeInteger&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp; 1,
&amp;nbsp; fieldTypeSingle&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp; 2,
&amp;nbsp; fieldTypeDouble&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp; 3,
&amp;nbsp; fieldTypeString&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp; 4,
&amp;nbsp; fieldTypeDate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp; 5,
&amp;nbsp; fieldTypeOID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp; 6,
&amp;nbsp; fieldTypeGeometry&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp; 7,
&amp;nbsp; fieldTypeBlob&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp; 8,
&amp;nbsp; fieldTypeRaster&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp; 9,
&amp;nbsp; fieldTypeGUID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 10,
&amp;nbsp; fieldTypeGlobalID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 11,
&amp;nbsp; fieldTypeXML&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 12,
};
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Noob mistake.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:22:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/accessing-the-fieldtype/m-p/457897#M776</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-12-11T20:22:44Z</dc:date>
    </item>
  </channel>
</rss>

