ERROR

Attribute column not found

Last Published: November 16, 2021

Error Message

After creating a feature layer using a QueryDef, identifying features may fail with the following error:

Error:   
Oracle: "Attribute column not found:[ORA-00904: invalid column name][<name of QueryDef>]"
Error:   
SQLServer: "Attribute column not found[Microsoft OLE DB Provider for SQL Server: Deferred prepare could not be completed][][<name of QueryDef>]"

When the table for the layer is opened, it does not display any rows.

Cause

The QueryDef object is not handling wild cards (*) for its SubFields property if there are fully qualified fields in any of the tables (for example AREA).

Solution or Workaround

If using wild cards for the SubFields property in the QueryDef, such as:

.SubFields = "*" 
.SubFields = "<table name>.*" 

And there is a qualified field name in the table, it is necessary to explicitly list those fields that are to be included in the QueryDef, even if it is all of the fields in the table:

.SubFields = "field1,field2,field3,..." 

Article ID:000003383

Software:
  • ArcMap 8 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic