Tuesday, September 30, 2008

When defining projection from ArcCatalog (shapefile properties) I get an error message "Failed to Alter the Spatial Reference". If I try to do this from the "Define Projection" geoprocessing tool (ArcToolbox) I get this error insted: "Cannot create a projection file for filepath Failed to execute (DefineProjection).

I solved this problem by accesing the shapefile through a mapped drive (a.k.a. "Z:\") within ArcCatalog, rather than its \\server\drive$ pathname.

Friday, September 19, 2008

There are multiple caching levels to be mindful of with a typical ArcGIS Server environment. This factor often makes debugging difficult. Below I have made an expanding list of issues related to cahcing as well as the various cache levels to clear when debugging.

Issues related to caching: query does not return correct field as defined in 'outFields' query property

Cache Levels
  1. AGS web service cache, this can be cleared by restarting the AGS web service from ArcCatalog or by web admin interface
  2. Tile cache, cleared by 'deleting cache', and then reconfiguring tile cache within service properties of the web service
  3. Web browser cache, cleared by clearing cache of web browser
  4. REST API cache, cleared by going to http://yourserveraddress/ArcGIS/rest/admin/cache and clearing cache manually
  5. KML cache, if using a Google hosted KML with your application, to have this load dynamically you need to add a random number to the end of your kml address ... google it!

Wednesday, September 17, 2008

To do a non-boolean conditional insert in SQL Server (the "where exists" clause is best for boolean), use the "where in" clause along with an inner join, in the following form:

INSERT INTO [Destination Table]([Destination Field1],[Destination Field2],[...])
SELECT [Origin Field1],[Origin Field2],[...]
FROM [Origin Table]
WHERE ([Test Field A, could be from origin] Not In (select [Test Field B] from
[Test Table, could be destination]));