Has anyone ever noticed that the layer.definitionQuery property will just blindly assign anything you give to it, even if its an invalid query?
Example:
This is an invalid query. The FIELDNAME should be in quotes.
This is a valid query:
Does anyone know of a method to validate the query before blindly applying what could be an invalid query?
Example:
This is an invalid query. The FIELDNAME should be in quotes.
Code:
lyr.definitionQuery = "FIELDNAME = 'VALUE'"
Code:
lyr.definitionQuery = "'FIELDNAME' = 'VALUE'"