How To: Alter the source database of a checked-in AXF file


After checking in an AXF file to ArcMap, there is no utility for changing the geodatabase in which the AXF data resides. This workflow allows the user to change the geodatabase from which the original data was checked out.



Esri recommends creating a backup copy of both the entire ArcPad project folder that contains the AXF file, and the geodatabase on the network drive.
  1. Open ArcMap and create a new ArcPad checkout/AXF using the same data from the geodatabase but from the new workspace location. Ensure Check Out for disconnected editing in ArcPad is used as the checkout option to generate the AXF file.
  2. Open ArcPad Studio in Expert Mode.
    ArcPad 10.2 is permanently in expert mode, and no additional steps are required. In ArcPad 10.x or earlier, to launch in expert mode, use the following workflow:
    a. Create a shortcut to ArcPad Studio.
    b. Right-click the shortcut, and select Properties.
    c. Append '/expert' to the target path, and click OK.
    d. Open ArcPad Studio via this shortcut. Check that [Expert Mode] is displayed in the Window Title.
  3. Open both the existing AXF and the AXF from the checkout in Step 1.
  4. Browse the AXF tree view of both files to the AXF_PROPERTIES table (inside the folder Spatial Information Schema Tables), and double-click the table. A SQL statement appears at the top of the table.

    The following steps pertain to modifying the SQL to modify the contents of the table.
  5. Delete the following line so only '[XML]'' is present:

    '{' + CONVERT(NVARCHAR(32), DATALENGTH([XML])) + ' bytes}'

    from the line

    '{' + CONVERT(NVARCHAR(32), DATALENGTH([XML])) + ' bytes}' AS [XML]

    leaving just [XML], and click the red exclamation mark to run the SQL. The XML field for the AXF_TRANSACTION_LOG record that previously contained only a count of some bytes now contains a lot of XML text.
  6. Edit the XML and replace it. Copy all of the transaction log information from the new AXF to a text-based editor, such as Notepad.
  7. Use a Find/Replace tool to change every single quote ('), to a pair of single quotes ('') (not a double quote).
  8. Copy the result.
  9. Open the AXF_PROPERTIES table for the existing AXF file and create the following SQL in ArcPad Studio:

    UPDATE AXF_PROPERTIES SET XML = 'paste contents from clipboard here' WHERE NAME = 'AXF_TRANSACTION_LOG'
  10. Click the red exclamation mark to execute the query. All of the transaction log in the AXF now matches the transaction log from the new AXF. Check in the AXF file via Get Data From ArcPad successfully to the new source.