Interstage Shunsaku Data Manager Application Development Guide - Microsoft(R) Windows(R) 2000/ Microsoft(R) Windows Server(TM) 2003 - - UNIX -
Contents Index PreviousNext

Part 1 The Basic for Developing Application> Chapter 4 Data Updating Methods

4.4 Updating Data

The following figure shows the flow for updating data using the API.

[Figure 4-5 Flow for Updating Data Using the API]

  1. Obtain the record ID of the XML document to be updated.

    Perform a data search to identify the XML document to be updated, and obtain its record ID.

  2. Specify the record ID and XML document, and update the XML file.

    Invoke the API to perform the update, specifying the obtained record ID and the replacement XML document, and update the XML document.

More than one record ID and replacement XML document can be specified at the same time to update multiple XML documents.

If an XML document has been replaced since it was obtained, Shunsaku will notify an error in order to maintain the integrity of the data.

The following figure shows how Shunsaku notifies errors in order to maintain data integrity.

[Figure 4-6 How Shunsaku Notifies Errors to Maintain Data Integrity]

If an error occurs with update processing, the following action will be taken.

The following figure shows the flow of action taken when errors occur with update processing.

[Figure 4-7 Flow of Action Taken when Errors Occur with Update Processing]

  1. Re-identify the XML document to be updated and re-obtain its record ID.

    Perform another data search to identify the XML document to be updated, and re-obtain the latest XML document to be updated and its record ID. Alternatively, if it is known that the items specified in the search condition have not been updated, it is also possible to re-obtain the latest XML document to be updated and its record ID by specifying the known record ID.

  2. Specify the record ID and XML document, and update the XML document.

    Invoke the API that will perform the update, specifying the re-obtained record ID and the replacement XML document, and update the XML document.


Contents Index PreviousNext

All Rights Reserved, Copyright(C) FUJITSU LIMITED 2006