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 6 Direct Access Function> 6.5 Deleting Data by Direct Access Key

6.5.3 For C API

The ShunDeleteKey function is used in the direct deletion for C API.The following figure shows a flow of the direct deletion for C API.

[Figure 6-10 A Flow of the Direct Deletion]

mark1Sample Code

/* This program assumes that the following variables have been declared     */
/* pKey       : Structure array for setting the direct access keys */

SHUNHSTMT StmtH;
/* Allocate data manipulation handle */
ShunAllocHandle(ConH, &StmtH);

/* Use direct access key to perform delete */
pKey[0].Key = "20061101,00000001";                                         (1)
pKey[0].Key_Len = strlen( pKey[0].Key );
pKey[1].Key = "20061101,00000002";                                         (1)
pKey[1].Key_Len = strlen( pKey[1].Key );
pKey[2].Key = "20061101,00000003";                                         (1)
pKey[2].Key_Len = strlen( pKey[2].Key );
ShunDeleteKey(StmtH, "key1", SHUN_KEY_COMPLETE_MATCH, 3, pKey);            (2)

/* Release data manipulation handle */
ShunFreeHandle(StmtH);

mark2(1) Set the Direct Access Key

Set the direct access key at the SHUNKEY structure.

mark2(2) Delete the XML Document

Specify the data manipulation handle, the direct access key name, the number of the data to be deleted and the direct access key to be deleted as the ShunDeleteKey function and then execute the deletion.

Specify multiple direct access keys with the ShunDeleteKey function to delete multiple XML documents at a time.

Refer to J.3.3 Delete Data Using Direct Access Key for the sample program of the direct access.

Contents Index PreviousNext

All Rights Reserved, Copyright(C) FUJITSU LIMITED 2006