Error reading OID from table

11127
4
12-14-2015 01:05 PM
ChrisSmith7
Frequent Contributor

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:

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.

From what I can tell, it's an issue with including the PK on the table:

Here's the data type:

idnum (PK, FK, numeric(18,0), not null)

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.

Any help is appreciated! Thanks!

4 Replies
ChrisSmith7
Frequent Contributor

Unless someone has a better idea, I'm just going to create a view in SQL with an integer data type for ID.

0 Kudos
deleted-user-ZMHeMpwIlo8S
New Contributor II

I'm having the same issue. Did you find that changing the data type fixed your issue?

0 Kudos
FredCoud
New Contributor III

I have the same issue. But I have not found any solution yet.

0 Kudos
Bud
by
Notable Contributor

I had the same problem with an Oracle view:

I solved the problem by putting the query in a subquery and adding a GROUP BY clause. It worked!

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.

0 Kudos