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!
Unless someone has a better idea, I'm just going to create a view in SQL with an integer data type for ID.
I'm having the same issue. Did you find that changing the data type fixed your issue?
I have the same issue. But I have not found any solution yet.
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.