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.2 For .NET API

The DeleteByKey method is used in the direct deletion for .NET API.

The following figure shows the flow of the direct deletion for .NET API.

[Figure 6-9 The Flow of the Direct Deletion]

mark1Sample Code

ShunService service = new ShunService();
service.Connect();

ShunRecord record1 = new ShunRecord();
ShunRecord record2 = new ShunRecord();
ShunRecord record3 = new ShunRecord();
record1.Key = "20061101,00000001";                                        (1)
record2.Key = "20061101,00000002";                                        (1)
record3.Key = "20061101,00000003";                                        (1)

ShunKeyRequirement keyReq = new ShunKeyRequirement();                     (2)
keyReq.KeyName = "key1";                                                  (3)
keyReq.SearchType = ShunKeySearchType.CompleteMatch;                      (3)
keyReq.Records.Add( record1 );                                            (3)
keyReq.Records.Add( record2 );                                            (3)
keyReq.Records.Add( record3 );                                            (3)

service.DeleteByKey( keyReq );                                            (4)

service.Disconnect();

mark2(1) Set the Direct Access Key

Set the direct access key at the ShunRecord object.

mark2(2) Create a ShunKeyRequirement Object

Create the ShunKeyRequirement object.

mark2(3) Set to the ShunKeyRequirement object

Set the direct access key name and the ShunRecored object to the ShunKeyRequirement object.

Specify multiple ShunRecord objects with the add method to delete multiple XML documents at a time.

mark2(4) Delete the Data

Specify the ShunKeyRequirement object to the DeleteByKey method and execute the deletion.

Refer to the following sections for the sample programs of the direct access.
For C# .NET: G.3.3 Delete Data Using Direct Access Key
For VB .NET: H.3.3 Delete Data Using Direct Access Key
For C++ .NET: I.3.3 Delete Data Using Direct Access Key

Contents Index PreviousNext

All Rights Reserved, Copyright(C) FUJITSU LIMITED 2006