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 ShunInsert function to add data.
The following diagram shows process for adding data.
SHUNHSTMT StmtH; /* Allocate data manipulation handle*/ ShunAllocHandle(ConH, &StmtH); (1) /* Add XML documents */ SHUNDATA Data[1]; Data[0].Data = "<document>" " <base>" : " </base>" " <information>" : " </information>" "</document>"; Data[0].Data_Len = strlen( Data[0].Data ); ShunInsert(StmtH, 1, 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.
To add XML documents, specify the data manipulation handle, the number of data items to be added, and the XML documents to be added in the ShunInsert function.
The ShunInsert function can be used to add multiple XML documents at a time. Either of the following specification methods can be used.
- Specify multiple XML documents consecutively in a single additional data area.
- Specify more than one additional data area.
After data addition is complete, use the ShunFreeHandle function to release the data manipulation handle.
Contents
Index
![]() ![]() |