Query Layer OID Errors

2365
7
03-02-2010 07:02 AM
TedCronin
MVP Honored Contributor
If I open table on a query layer that I have added to ArcMap, the table opens in about a minute or two, and then I receive a couple of messages about errors reading OID, then only a few records actually open in the table. See Attachments. I am using sql server 2005 sp3, on Windows Server 2003 R2, with ArcSDE 9.3.1, all 64 bit.

OS Authenticated.
0 Kudos
7 Replies
BartHound
New Contributor
If I want to refine my tables, and I do not set a UID, I am unable to go backwards, without checking a UID first.  If I don't, I need to Cancel and start over.  I should be able to go Back w/o checking a UID.

You know control check box turns on/off All Fields, not sure if this is intended or wanted.  If it is wanted, it should be in the help.
0 Kudos
by Anonymous User
Not applicable
Original User: Bart_D_Hound

As part of the second error window, it states that OID Column has null value.  The field in not nullable.

Don't these two statements cross each other out.

I am using a table that has an Object ID, and it has no null values.
0 Kudos
by Anonymous User
Not applicable
Original User: russellb

Hi Bart and Ted,

Take a look at this help topic:
http://help.esri.com/en/arcgisdesktop/9.4/help/index.html#/Choosing-a-unique-identifier-field/006600...

From what you guys have said, I think this is expected behavior. There are two notes in that help topic that I think may help to explain what is happening on your end:
Note:
ArcGIS does not enforce that all values in the unique identifier field are not null. You will receive an error if ArcGIS encounters a null value. It is up to the creator of the query layer to ensure that all values used for the unique identifier are not null. You can validate the result set of a query layer to ensure all values used for the unique identifier are not null.

Note:
ArcGIS does not enforce the uniqueness of values in the unique identifier field. If ArcGIS encounters a non-unique value, no error is returned; however, you may see inconsistent results in selection sets or other queries in ArcGIS.
0 Kudos
TedCronin
MVP Honored Contributor
Yep, I read that doc, I guess my next move will be to summarize my object ID to ascertain whether there are any non unique values, I just thought since it is the Object ID, that there would be no null or all values would be unique.
0 Kudos
by Anonymous User
Not applicable
Original User: Bart_D_Hound

Yep, I read that doc, I guess my next move will be to summarize my object ID to ascertain whether there are any non unique values, I just thought since it is the Object ID, that there would be no null or all values would be unique.


Stupid me, I can't summarize an ObjectID, because it is ArcGIS maintained, and therefore since it is maintained as the Object ID, I expect the records to be unique and thus no NULL values, so why doesn't this work as the field for the query layer.

Now based on your earlier comments, I see this with opening the table, there is a certain threshold reached, but if I do a join, validate the join, then open table,  more records are viewable, when there should be about the same as my initial open before the join, this is unexpected on my side.
0 Kudos
RussellBrennan
Esri Contributor
Ted/Bart,

Rather than trying to troubleshoot this through the forums can you guys log support incidents with us. I think it will be faster to get an answer that way.

Russell
0 Kudos
by Anonymous User
Not applicable
Original User: Riverside

Will do Russell.
0 Kudos