sernst

arcpy.SelectLayerByAttribute_management error message

Discussion created by sernst on Dec 16, 2011
I have the following line of code:

arcpy.SelectLayerByAttribute_management(gridLyr, "NEW_SELECTION", "\"Page\" Like \'"+ Neighborhood +"%\'")


This line works just fine running directly in Python, or when running as a script tool in toolbox. However, when I publish the toolbox to ArcGIS Server, I get the following error:

ERROR 000358: Invalid expression Failed to execute (SelectLayerByAttribute).

Any suggestions? I'm not sure what is wrong, since it works great from my script.

Thanks,
Shawna

Outcomes