Why my definition query does not work in Server 10.1

Discussion created by jrflannery on May 20, 2013
Latest reply on May 20, 2013 by ciava.at
While migrating map services from ArcGIS for Server 10.0 to 10.1 I discovered something interesting that I thought important to share.

We use many of our map services in ArcGIS Explorer Desktop 1750.  When served from AGS 10.0, these map services appeared and performed properly in AGX Desktop.  When we migrated (re-published) our map services to AGS 10.1, some of our map services did not work in AGX Desktop (but did appear and work in ArcGIS Online).

We found that if a featureclasses in the published map contained a definition query and the definition query contained a 'space' in the wrong place, the map service would not appear at all in AGX.  This only holds true for services on AGS 10.1.

For example, this definition query works on AGS 10.0, but not 10.1:
  (Milepost %10= 0) AND Date_End IS NULL

This definition query works on AGS 10.1:
  (Milepost%10= 0) AND Date_End IS NULL

The space between the field name and the percent sign was the problem.