Interstage Shunsaku Data Manager Application Development Guide - Microsoft(R) Windows(R) 2000/ Microsoft(R) Windows Server(TM) 2003 - - UNIX - |
Contents
Index
![]() ![]() |
Part 2 Developing Applications by APIs | > Chapter 11 Developing C Applications | > 11.2 How to Use C APIs | > 11.2.3 Updating Data |
Use the ShunUpdateRecId function to update XML documents.
The ShunUpdateRecId function uses record IDs (conductor control information and reply record identifiers) to update data. Before executing the ShunUpdateRecId function, use the ShunSearch function to obtain the record IDs of the data to be updated. The process of using a record ID to update an XML document refers to replacing an existing XML document with a new XML document. It is not possible to update part of the data contained in an existing XML document.
The following diagram shows the process for updating data by specifying record IDs.
SHUNHSTMT StmtH; /* Allocate data manipulation handle */ ShunAllocHandle(ConH, &StmtH); (1) /* Use record ID to perform update */ ShunUpdateRecId(StmtH, 1, Rec_Id_In, Data); (2) /* Release data manipulation handle */ ShunFreeHandle(StmtH); (3) |
Allocate the data manipulation handle in advance by specifying the connection handle to be used as the parent handle in the ShunAllocHandle function.
Perform the update process by specifying the data manipulation handle, the number of data items to be updated, the record IDs to be updated, and the data to be updated in the ShunUpdateRecId function.
By specifying multiple record IDs and their corresponding data with the ShunUpdateRecId function, multiple XML documents can be updated at a time.
After data updating is complete, use the ShunFreeHandle function to release the data manipulation handle.
Contents
Index
![]() ![]() |