Unable to join shapefile and DBF file with a SPATIALQUERY statement


For transactions where there is intent to use fields from a joined table, a problem is encountered wherein only the shapefile's attribute fields are used, not those of the join-table.

An example of this is when an 'Identify' is performed to display a feature’s attributes, but the values of the join-table are not displayed. Another example is when VALUEMAPRENDERER or SIMPLELABELRENDERER are written to use the values from a joined field, but the result is that the features or labels are not displayed at all.

This occurs even though the SPATIALQUERY statement is constructed correctly.


The tables were not joined.

This is because the Spatial Server account does not have 'write' permissions for the external table (the From-table), or it may not have 'write' permissions for the SHAPEWORKSPACE directory.

As a result, ArcIMS is unable to create an associated index (CDX) file.

ArcIMS must have write-access to the external DBF file and the directory containing it in order to create the CDX file.

Solution or Workaround

The following steps refer to procedures in the Windows 200 context; the concept is the same for Unix.

  1. Determine the Windows account that the Spatial Server is using. Open the Services panel and determine which account is used for 'Log on' by the ArcIMS Monitor service. The Spatial Server acquires the permissions of this user.
  2. Navigate to Windows Explorer:

    - Right-click the folder containing the shapefile and the external DBF file. This is a SHAPEWORKSPACE directory.

    - Select Properties and click the Security tab.

    - Add the Spatial Server's user account, or use the 'Everyone' user.

    - Ensure that all the 'Allow' checkboxes are set (Full Control).

    - Click 'Advanced'

    - Select the Spatial Server user, or Everyone, and click 'View/Edit'.

    - Ensure that the 'Allow' checkbox is set for 'Create Files / Write Data'.

  3. Ensure the external DBF file (the From-table) is not in Read-Only mode.

    1. In Windows Explorer, right-click the file and select Properties.

    2. On the General Tab, find the Read-Only checkbox. Check or uncheck it as desired. Click OK to finish.

  4. Perform a map refesh in the viewer. Pan or zoom on the map. At this point, ArcIMS creates the CDX file in the SHAPEWORKSPACE directory. Now the results of the join expression should be visible. For example, when the Identify tool is used, the attributes from the Join table should now be displayed.
  5. If the data is static; for example, there is no intent to update it frequently, the external DBF file may now be reset to Read-Only mode. The CDX file may also be reset to Read-Only mode.

Article ID:000002259

  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic