English

Error: One or more layers failed to draw

Error Message

When attempting to draw a layer, such as zooming or identify on a particular feature class, ArcMap returns errors such as the following:

"One or more layers failed to draw:..."
"One or more layers failed to draw:
General Function Failure [Feature Class Name]
Syntax error in query expression'(<Feature Class>.OBJECTID = <Feature Class>_Shape_Index.IndexedObjectId and MaxGX >='X' and MinGX <='X' and MaxGY >='Y' amd MinGY <='Y')'"

After dismissing the error message, either a layer or the layer's labels do not draw. This message may also appear when trying to open a layer's attribute table.

Cause

There may be more than one reason why this message occurs:

  • It is possible that the data source type of an ArcMap layer has been changed to a type that has a different SQL syntax, or that there are label classes with invalid SQL syntax . A common example is when a layer's data source is changed from a shapefile to a geodatabase feature class or vice versa, and that layer has a definition query. Common layer SQL queries include: definition queries, SQL expressions used for multiple label classes, and symbology exclusion expressions. See also Error: One or more layers failed to draw: An invalid SQL statement was used. [ ]
  • This error may also occur if the name of the feature class begins with a number.

Solution or Workaround

In the latter case, simply rename the feature class to begin with a character rather than a number. 

If the first cause is the issue, after repairing/changing the layer's data source, update all layer SQL queries.

  1. Right-click on the layer in the Table of Contents and select Properties.
  2. If the layer has a definition query, select the Definition Query tab.
  3. Update the definition query syntax.
Note:
If unsure about the syntax, use the Query Builder to build a query based on the new data source type.
  1. If labeling with more than one class, select the Labels tab and click SQL query.
  2. Update the definition query syntax.
  3. If the layer is using symbology exclusion, select the Symbology tab.
  4. Open the Exclusion dialog box.
Note:
This dialog box is found in different places depending on what type of symbology is being used. If Single Symbol symbology, click the Exclude button. If Graduated Colors symbology, click Classify, then Exclusion.
  1. Follow these steps to build an exclusion expression using the syntax for the new data source.
    1. Open the Exclusion dialog box.
    2. Click the Query tab.
    3. Double-click the field that is being used to draw the layer.
    4. Double-click an operator.
    5. Double-click the value that will be excluded. If the value is not in the list, click the Complete List button.
    6. Click Apply to execute the expression and exclude values.
    7. Click the Legend tab.
    8. Check Show symbol for excluded values.
    9. Click OK.
  2. Click OK to close the Layer Properties dialog box.

Related Information