Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Using OIG for .NET : Passing Data to the eCTSsession Object

Passing Data to the eCTSsession Object
The following sections describe the parameter syntax for the eCTSsession class methods.
Strings
A simple string value:
Transaction = "DEMOTX"
Hashtable and NameValueCollection Classes
Sets of parameters are passed to methods of the eCTSsession class as name-value pairs using .NET collection classes. Session parameters have unique key names, and are passed via the Hashtable class. Transaction parameters can have more than one value per key name, and so are passed via the NameValueCollection class. The following is an example that passes both session and transaction parameters:
Dim MySesssion As eCTSsession = new eCTSsession
Dim MySessParms As Hashtable = new Hashtable
MySessParms("U") = "USR40"
MySessParms("P") = "USR40"
MySessParms("L") = "USR40"
MySession.OpenApplication MySessParms
Dim MyArgs As new NameValueCollection
MyArgs.Add("DEPT", "Sales")
MyArgs.Add("EMPLOYEE", "Sally")
MyArgs.Add("EMPLOYEE", "Tom")
MySession.RunTrans("DEMOTX", MyArgs)
Recordsets
An ADO.NET DataTable object can be used both as input to and a result from eCTSsession methods. By definition, ADO.NET DataSets are disconnected from a data source. This means that they are not actively connected to the source database, so any updates made to a DataTable within a DataSet are not directly reflected in the source database. However, a DataTable returned by an eCTSsession object can be modified and passed back to TIBCO Object Service Broker by another eCTSsession method call.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved