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 10 Developing .NET Applications | > 10.3 How to Use .NET APIs | > 10.3.3 Updating Data |
Use the Insert method to add data.
The following diagram shows the process for adding data.
ShunService service = new ShunService(); service.Connect(); String data = "<document>" +" <base>" : +" </base>" +" <information>" : +" </information>" +"</document>"; ShunRecordCollection recCol = new ShunRecordCollection(); (1) ShunRecord record = new ShunRecord( data ); (2) recCol.Add( record ); (3) service.Insert( recCol ); (4) service.Disconnect(); |
Dim service As New ShunService() service.Connect() Dim data As String = "<document>" _ &" <base>" _ : &" </base>" _ &" <information>" _ : &" </information>" _ &"</document>" Dim recCol As New ShunRecordCollection() (1) Dim record As New ShunRecord( data ) (2) recCol.Add( record ) (3) service.Insert( recCol ) (4) service.Disconnect() |
Create the ShunRecordCollection object.
Set the XML documents to be added at the ShunRecord object. Use the following methods to set the XML documents. Refer to the table below for the methods that can be used to add XML documents.
Method or property |
Function |
---|---|
ShunRecord(String data) |
Specifies XML documents to the arguments of the constructor and creates the ShunRecord object. |
ShunRecord(Stream stream) |
Specifies XML documents to the arguments of the constructor and creates the ShunRecord object. |
Data property |
Specifies the XML documents. |
setData(Stream stream) |
Specifies the XML documents. |
Set the ShunRecord object at ShunRecordCollection object.
Use the following methods to set the ShunRecord object, Refer to the table below for the methods that can be used to add XML documents.
Method or property |
Function |
---|---|
Add(ShunRecord record) |
Adds the ShunRecord to the end of ShunRecordCollection. |
AddRange(ShunRecord[] records) |
Copies the element of ShunRecord array to the end of ShunRecordCollection. |
Insert(int index, ShunRecord record) |
Inserts the ShunRecord at the index position specified in the ShunRecordCollection. |
Item[int index] |
Replaces the ShunRecord that the index position is specified. |
Use the Insert method to add the data.
Contents
Index
![]() ![]() |