<?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 Re: Error reading OID from table in ArcGIS Server with JavaScript API Questions</title>
    <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/error-reading-oid-from-table/m-p/811410#M342</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unless someone has a better idea, I'm just going to create a view in SQL with an integer data type for ID.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Dec 2015 22:45:38 GMT</pubDate>
    <dc:creator>ChrisSmith7</dc:creator>
    <dc:date>2015-12-15T22:45:38Z</dc:date>
    <item>
      <title>Error reading OID from table</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/error-reading-oid-from-table/m-p/811409#M341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to direct connect to a table on an MS SQLSERVER 2008 slice. I would like to create an x,y event layer to display on a web map using the JavaScript API. I am, however, receiving an error message when I attempt to open the table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Error reading OID from table. Reading rows has been stopped. Check that the datasource is valid. OID mapped column has null value. The operation is not supported by this implementation.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&lt;IMG class="image-1 jive-image" height="127" src="https://community.esri.com/legacyfs/online/156173_pastedImage_10.png" style="width: 313px; height: 126.581px;" width="313" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From what I can tell, it's an issue with including the PK on the table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" height="454" src="https://community.esri.com/legacyfs/online/156174_pastedImage_11.png" style="width: 523px; height: 453.829px;" width="523" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the data type:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14501269874903783 jive_text_macro" data-renderedposition="906_8_912_16" jivemacro_uid="_14501269874903783"&gt;&lt;P&gt;idnum (PK, FK, numeric(18,0), not null)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am unable to change structure - is there any way to work around this? My dev environment is using ArcGIS Server 10.2 - my production environment is 10.3 if this is a bug of some sorts in 10.2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated! Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2015 21:05:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/error-reading-oid-from-table/m-p/811409#M341</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2015-12-14T21:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: Error reading OID from table</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/error-reading-oid-from-table/m-p/811410#M342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unless someone has a better idea, I'm just going to create a view in SQL with an integer data type for ID.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Dec 2015 22:45:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/error-reading-oid-from-table/m-p/811410#M342</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2015-12-15T22:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error reading OID from table</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/error-reading-oid-from-table/m-p/811411#M343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm having the same issue. Did you find that changing the data type fixed your issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2017 18:21:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/error-reading-oid-from-table/m-p/811411#M343</guid>
      <dc:creator>deleted-user-ZMHeMpwIlo8S</dc:creator>
      <dc:date>2017-11-21T18:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: Error reading OID from table</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/error-reading-oid-from-table/m-p/811412#M344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the same issue. But I have not found any solution yet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2018 14:25:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/error-reading-oid-from-table/m-p/811412#M344</guid>
      <dc:creator>FredCoud</dc:creator>
      <dc:date>2018-12-05T14:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: Error reading OID from table</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/error-reading-oid-from-table/m-p/811413#M345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had the same problem with an Oracle view:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="/legacyfs/online/432570_Error reading OID from table.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I solved the problem by putting the query in a &lt;STRONG&gt;subquery&lt;/STRONG&gt;&amp;nbsp;and adding a &lt;STRONG&gt;GROUP BY&lt;/STRONG&gt; clause. &lt;STRONG&gt;It worked!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Note: The GROUP BY is completely pointless; I GROUP BY on all columns, and all the rows are unique, so the number of rows does not change. The only reason I GROUP BY is to avoid getting the error.&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2019 14:59:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/error-reading-oid-from-table/m-p/811413#M345</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2019-01-04T14:59:33Z</dc:date>
    </item>
  </channel>
</rss>

