AppConnSessionEx Object

Use the AppConnSessionEx object to issue terminal commands and obtain information about terminal, model, and table metadata.

Click any of the following methods or properties to see information on its use, syntax, and parameters:

ConnectToModel Method

Establishes a connection to a Verastream server on the specified server with the specified model name. User ID, password, and model variables to initialize may also be specified.

Syntax

object.ConnectToModel Server, ModelName, [UserID], [Password], [ModelVariables]

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
Server The Verastream server DNS name or IP address
ModelName The name of the Verastream model
User ID [optional] The user ID for authorization on the Verastream server
Password [optional] The password for authorization the Verastream server
ModelVariables [optional] An AppConnStringMap with name/values pairs of variables to set during connection

Remarks

The parameters userID and password are used by Verastream Server if the security option is ON.

Reasons for failure include:

  1. Server is not running
  2. Invalid server address
  3. Invalid model name
  4. Invalid userID and/or password.

Example

Dim Verastream_Session As AppConnModel
Dim strServerName, strModelName, strUserID, strPassword As String
Dim ModelVars As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"

Set ModelVars = New AppConnStringMap

strUserID = ""
strPassword = ""
ModelVars.Add "userID", "bjones"
ModelVars.Add "password", "bjones"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName, _
                    strUserID, strPassword, ModelVars
If Not Verastream_Session.IsConnected Then
    MsgBox ("Verastream Not Connected")
Else
    MsgBox ("Verastream Connected")
End If

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set ModelVars = Nothing

See also

ConnectToModelViaDomain
ConnectToSession
ConnectToSessionViaDomain
SuspendConnection
ResumeConnection
Disconnect

ConnectToModelViaDomain Method

Establishes a connection to a Verastream server and create a host session with the specified model name in the specified Verastream Verastream domain. User ID, password, and model variables to initialize may also be specified.

Syntax

object.ConnectToModelViaDomain DirectoryServer, Domain, ModelName, [UserID], [Password], [ModelVariables]

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
DirectoryServer The Verastream directory server DNS name or IP address
Domain The name of the Verastream domain
ModelName The name of the Verastream model
User ID [optional] The user ID for authorization on the Verastream server
Password [optional] The password for authorization the Verastream server
ModelVariables [optional] An AppConnStringMap with name/values pairs of variables to set during connection

Remarks

Reasons for failure include:

  1. Server is not running
  2. Invalid server address
  3. Invalid model name
  4. Invalid userID and/or password.
The parameters userID and password are used by Verastream if the security option is ON.

Example

Dim Verastream_Session As AppConnModel
Dim strDirectoryServerName, strDomainName, strModelName, strUserID, _
    strPassword As String
Dim ModelVars As AppConnStringMap

strModelName = "CCSDemo"
strDirectoryServerName = "localhost"
strDomainName = "localhost"

Set ModelVars = New AppConnStringMap

strUserID = ""
strPassword = ""
ModelVars.Add "userID", "bjones"
ModelVars.Add "password", "bjones"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModelViaDomain strDirectoryServerName, _
        strDomainName, strModelName, strUserID, strPassword, ModelVars
If Not Verastream_Session.IsConnected Then
    MsgBox ("Verastream Not Connected")
Else
    MsgBox ("Verastream Connected")
End If

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set ModelVars = Nothing

See also

ConnectToModel
ConnectToSession
ConnectToSessionViaDomain
SuspendConnection
ResumeConnection
Disconnect

ConnectToSession Method

Establishes a connection to a Verastream server on the specified server for the specified session. User ID, password, and model variables to initialize may also be specified.

Syntax

object.ConnectToSession Server, Session, [UserID], [Password], [ModelVariables]

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
Server The Verastream server DNS name or IP address
Session The name of the Verastream session
User ID [optional] The user ID for authorization on the Verastream server
Password [optional] The password for authorization the Verastream server
ModelVariables [optional] An AppConnStringMap with name/values pairs of variables to set during connection

Remarks

The parameters userID and password are used by Verastream server if the security option is ON.

Reasons for failure include:

  1. Server is not running
  2. Invalid server address
  3. Invalid model name
  4. Invalid userID and/or password.

Example

Dim Verastream_Session As AppConnModel
Dim strServerName, strSessionPoolName, strUserID, strPassword As String
Dim ModelVars As AppConnStringMap

strSessionPoolName = "CCSDemo"
strServerName = "localhost"

Set ModelVars = New AppConnStringMap

strUserID = ""
strPassword = ""
ModelVars.Add "userID", "bjones"
ModelVars.Add "password", "bjones"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToSession strServerName, strSessionPoolName, _
                    strUserID, strPassword, ModelVars
If Not Verastream_Session.IsConnected Then
    MsgBox ("Verastream Not Connected")
Else
    MsgBox ("Verastream Connected")
End If

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set ModelVars = Nothing

See also

ConnectToModel
ConnectToModelViaDomain
ConnectToSessionViaDomain
SuspendConnection
ResumeConnection
Disconnect

ConnectToSessionViaDomain Method

Establishes a connection to a Verastream server and creates a host session for the specified session in the specified Verastream Verastream domain. User ID, password, and model variables to initialize may also be specified.

Syntax

object.ConnectToSessionViaDomain DirectoryServer, Domain, Session, [UserID], [Password], [ModelVariables]

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
DirectoryServer The Verastream directory server DNS name or IP address
Domain The name of the Verastream domain
Session The name of the Verastream session
User ID [optional] The user ID for authorization on the Verastream server
Password [optional] The password for authorization the Verastream server
ModelVariables [optional] An AppConnStringMap with name/values pairs of variables to set during connection

Remarks

Reasons for failure include:

  1. Server is not running
  2. Invalid server address
  3. Invalid model name
  4. Invalid userID and/or password.

The parameters userID and password are used by Verastream Server if the security option is ON.

Example

Dim Verastream_Session As AppConnModel
Dim strDirectoryServerName, strDomainName, strSessionPoolName, strUserID, _
     strPassword As String
Dim ModelVars As AppConnStringMap

strSessionPoolName = "CCSDemo"
strDirectoryServerName = "localhost"
strDomainName = "localhost"

Set ModelVars = New AppConnStringMap

strUserID = ""
strPassword = ""
ModelVars.Add "userID", "bjones"
ModelVars.Add "password", "bjones"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToSessionViaDomain strDirectoryServerName, _
    strDomainName, strSessionPoolName, strUserID, strPassword, ModelVars
If Not Verastream_Session.IsConnected Then
    MsgBox ("Verastream Not Connected")
Else
    MsgBox ("Verastream Connected")
End If

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set ModelVars = Nothing

See also

ConnectToModel
ConnectToModelViaDomain
ConnectToSession
SuspendConnection
ResumeConnection
Disconnect

Disconnect Method

Disconnects from a Verastream Server session.

Syntax

object.Disconnect([Reserved])

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
Reserved [optional] Reserved parameter

Remarks

Use the Disconnect method to end the connection to a Verastream session.

Reasons for failure include:

  1. Server session has not been established

Example

Dim Verastream_Session As AppConnModel
Dim strServerName, strModelName, strUserID, strPassword As String
Dim ModelVars As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"

Set ModelVars = New AppConnStringMap

strUserID = ""
strPassword = ""
ModelVars.Add "userID", "bjones"
ModelVars.Add "password", "bjones"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName, _
                    strUserID, strPassword, ModelVars
If Not Verastream_Session.IsConnected Then
    MsgBox ("Verastream Not Connected")
Else
    MsgBox ("Verastream Connected")
End If

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set ModelVars = Nothing


ErrorCount

Use this property to specify the error count.

Syntax

object.ErrorCount

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)

 


GetAttributeAtCursor Method

Retrieves the name of the attribute at the current cursor position.

Syntax

AttributeName = object.GetAttributeAtCursor

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
AttributeName The name of the attribute

Remarks

Use the GetAttribueAtCursor method to get the name of the attribute at the current cursor position, when a host application positions the cursor on an attribute as part of it's processing.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strAttributeName As String

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strAttributeName = Verastream_Session.GetAttributeAtCursor
MsgBox ("The attribute name at the current cursor position is " & strAttributeName)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing

GetAttributeLocations Method

Used to get the locations for the given attributes.

Syntax

Locations = object.GetAttributeLocations(AttributeNames)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, AppConnTable, and AppConnSessionEx)
AttributeNames The names of the attributes
Locations The locations of the attributes

Remarks

Use the GetAttributeLocations method to get locations of the given attributes.

GetAttributeMetaData Method

Retrieves the metadata for an attribute of an entity.

Syntax

Set AttributeMetaData = object.GetAttributeMetaData (EntityName, AttributeName)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
EntityName The name of the entity
AttributeName The name of the attribute
AttributeMetaData The metadata for the attribute

Remarks

Use the GetAttribueMetaData method to get the metadata for an attribute of an entity.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntity, strAttribute As String
Dim objMetaData As AttributeMetaData

strModelName = "CCSDemo"
strServerName = "localhost"
strEntity = "AcctTransactions"
strAttribute = "AcctNumber"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName
Set objMetaData = Verastream_Session.GetAttributeMetaData(strEntity, strAttribute)

MsgBox ("Description " & objMetaData.Description)
MsgBox ("IsReadable " & objMetaData.IsReadable)
MsgBox ("IsWriteable " & objMetaData.IsWriteable)
MsgBox ("Length " & objMetaData.Length)
MsgBox ("MetaDataType " & objMetaData.MetaDataType)
MsgBox ("Name " & objMetaData.Name)
MsgBox ("ReadVariable " & objMetaData.ReadVariable)
MsgBox ("TerminalAttributesEnabled " & objMetaData.TerminalAttributesEnabled)
MsgBox ("WriteVariable " & objMetaData.WriteVariable)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing

GetAttributes Method

Retrieves the attributes of the current entity.

Syntax

Set Attributes = object.GetAttributes([AttributeNames])

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
AttributeNames [optional] An AppConnStringList with the names of the attributes. If no AttributeNames are specified, GetAttributes returns all attributes of the entity.
Attributes An AppConnRecord with the Attributes names and values

Example

Dim Verastream_Session As AppConnModel
Dim AttributeRecord As AppConnModelRecord
Dim AttributeList As AppConnStringList
Dim strModelName, strServerName, strEntity As String
Dim I As Integer

strModelName = "CCSDemo"
strServerName = "localhost"
strEntity = "SignonPanel"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName
Verastream_Session.SetCurrentEntity (strEntity)
Set AttributeRecord = Verastream_Session.GetAttributes
Set AttributeList = Verastream_Session.GetEntityAttributes(strEntity)

For I = 1 To AttributeRecord.Count
    MsgBox ("Attribute " & AttributeList(I) & " = " & AttributeRecord(I))
Next

Set AttributeRecord = Nothing
Set AttributeList = Nothing
Verastream_Session.Disconnect
Set Verastream_Session = Nothing

EnableTerminalAttributes Method

Sets the AppConn object to return terminal attribute information when retrieving a recordset.

Syntax

object.EnableTerminalAttributes enable

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
enable True or False

Remarks

Use the EnableTerminalAttributes method to set the AppConn connector so that subsequent fetches of recordsets will contain terminal attribute information.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName As String

strModelName = "CCSDemo"
strServerName = "localhost"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName
Verastream_Session.EnableTerminalAttributes True

Verastream_Session.Disconnect
Set Verastream_Session = Nothing

ExecuteSQLStatement Method

Used to execute an SQL statement to return a recordset.

Syntax

Set RecordSet = object.ExecuteSQLStatement(SQLStatement)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
SQLStatement An SQL statement that will be executed by the server
RecordSet The AppConnRecordset returned for the SQL statement

Remarks

Use the ExecuteSQLStatement method to execute an SQL statement.

Example

Dim Verastream_Session As AppConnTable
Dim Verastream_Recordset As AppConnRecordSet
Dim Verastream_Record As AppConnRecord
Dim strModelName, strServerName, strSQLStatement As String

strModelName = "CCSDemo"
strServerName = "localhost"
strSQLStatement = "select * from transactions where AcctNumber = '167439459'"

Set Verastream_Session = New AppConnTable
Verastream_Session.ConnectToModel strServerName, strModelName

Set Verastream_Recordset = Verastream_Session.ExecuteSQLStatement(strSQLStatement)

For Each Verastream_Record In Verastream_Recordset
    MsgBox ("The date field within the recordset is " & Verastream_Record!Date)
Next

Verastream_Session.Disconnect
Set Verastream_Record = Nothing
Set Verastream_Recordset = Nothing
Set Verastream_Session = Nothing

ExecuteSQLStatementWithMaxRows Method

Used to execute an SQL statement to return a recordset, specifying maximum rows.

Syntax

Set RecordSet = object.ExecuteSQLStatementWithMaxRows(SQLStatement, maxRows)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
SQLStatement An SQL statement that will be executed by the server
maxRows Maximum number of rows of data to be returned
RecordSet The AppConnRecordset returned for the SQL statement

Remarks

Use the ExecuteSQLStatement method to execute an SQL statement while specifying a maximum number of rows to be returned.

 

FetchRecords Method

Fetches data from a recordset on the Verastream server. If the number of rows to fetch is not specified or is 0 then the number of rows that will be returned is unlimited. If the field names is not specified or specified as an empty list then all fields will be returned.

Syntax

Set RecordSet = object.FetchRecords([MaxRows], [FieldNames], [FilterExpression])

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
MaxRows [optional] The maximum number of rows that will be fetched
FieldNames [optional] An AppConnStringList with the names of the fields to be returned
FilterExpression [optional] An expression used to filter which records will be fetched
RecordSet The set of records returned from the fetch

Remarks

Use the FetchRecords method to when retrieving information from a recordset defined in Verastream.

Example

Dim Verastream_Session	As AppConnModel
Dim Records				As AppConnRecordSet
Dim record				As Variant
Dim CustomerAccounts	As Collection
Dim strModelName, strServerName, strEntityName, strAttrName, strAttrValue As String

strModelName = "CCSDemo"
strServerName = "localhost"

Set Verastream_Session = New  AppConnModel
Verastream_Session.ConnectToModel  strServerName,strModelName 
strEntityName =    "CustInquiryPanel"   
Verastream_Session.SetCurrentEntity  strEntityName 
If StrComp(Verastream_Session.GetCurrentEntity, strEntityName) <>   0 Then
    MsgBox ("Set Current Entity Error")
End If
    
strAttrName = "AcctNumber"
strAttrValue = "167439459"
Set Attributes = New AppConnStringMap
Attributes.Add strAttrName, strAttrValue
Verastream_Session.SetAttributes Attributes
    
strEntityName = "AcctTransactions"
Verastream_Session.SetCurrentEntity strEntityName
If StrComp(Verastream_Session.GetCurrentEntity, strEntityName) = 0 Then
    Set Records = Verastream_Session.FetchRecords
    For Each record In Records
        MsgBox ("Amount = " & record!Amount)
    Next record
Else
    MsgBox ("Set Current Entity Error")
End If
    
Verastream_Session.Disconnect
Set Verastream_Session = Nothing

ConnectionTimeout Method

Gets or sets how long Host Integrator continues attempting to establish a connection if for any reason the connection cannot be established on the first try. The value is in seconds.

Syntax

For getting: Timeout = object.ConnectionTimeout

For setting: object.ConnectionTimeout Timeout

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
Timeout The amount of time (seconds) Host Integrator continues attempting to establish a connection if for any reason the connection cannot be established on the first try.

Remarks

Getting or setting a connection timeout is useful, for example, if the server is temporarily unable to allow any more sessions, or if the domain load has been reached. Connection attempt information, include the number of connection attempts and the time of those attempts, is written to the log.

The default value is 30 (seconds).

GetColumnMetaData Method

Retrieves the metadata for the named column in the named table.

Syntax

Set ColumnMetaData = object.GetColumnMetaData (TableName, ColumnName)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
TableName The name of the table defined in Verastream as a string
ColumnName The name of the column defined in the table as a string
ColumnMetaData The ColumnMetaData object for the column

Remarks

Use the GetColumnMetaData method to get the metadata for the given column.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntity As String
Dim strAttrName, strAttrValue, strRecordset, strRecordsetOut As String
Dim ColumnMeta As ColumnMetaData
Dim Attributes As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strEntityName = "CustInquiryPanel"
Verastream_Session.SetCurrentEntity strEntityName

strAttrName = "AcctNumber"
strAttrValue = "167439459"
Set Attributes = New AppConnStringMap
Attributes.Add strAttrName, strAttrValue
Verastream_Session.SetAttributes Attributes
    
strEntityName = "AcctTransactions"
Verastream_Session.SetCurrentEntity strEntityName

strRecordset = "AcctTransData"
Verastream_Session.SetCurrentRecordSetByName strRecordset

Set ColumnMeta = Verastream_Session.GetColumnMetaData("Transactions", "AcctNumber")
MsgBox ("Column type = " & ColumnMeta.ColumnType)
MsgBox ("Column description = " & ColumnMeta.Description)
MsgBox ("Column is key field = " & ColumnMeta.IsKey)
MsgBox ("Column meta data type = " & ColumnMeta.MetaDataType)
MsgBox ("Column maximum = " & ColumnMeta.Max)
MsgBox ("Column minimum = " & ColumnMeta.Min)
MsgBox ("Column name = " & ColumnMeta.Name)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set Attributes = Nothing
Set ColumnMeta = Nothing

GetCurrentEntity Method

Retrieves the current entity (for example, screen) of the legacy application.

Syntax

CurrentEntity = object.GetCurrentEntity

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
CurrentEntity The name of the entity

Remarks

Use the GetCurrentEntity method to get the name of the current entity.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strCurrentEntity  As String

strModelName = "CCSDemo"
strServerName = "localhost"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName
  
strCurrentEntity = Verastream_Session.GetCurrentEntity
MsgBox ("Current entity name = " & strCurrentEntity)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing

GetCurrentRecord Method

Retrieves the record at the current index for a Verastream recordset.

Syntax

Set Record = object.GetCurrentRecord

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
Record A record with the fields names and values

Remarks

Use the GetCurrentRecord method to retrieve the record at the current record index in a Verastream recordset.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntityName As String
Dim strAttrName, strAttrValue, strIndex As String
Dim modRecord As AppConnModelRecord
Dim Attributes As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strEntityName = "CustInquiryPanel"
Verastream_Session.SetCurrentEntity strEntityName

strAttrName = "AcctNumber"
strAttrValue = "167439459"
Set Attributes = New AppConnStringMap
Attributes.Add strAttrName, strAttrValue
Verastream_Session.SetAttributes Attributes
Set Attributes = Nothing
    
strEntityName = "AcctTransactions"
Verastream_Session.SetCurrentEntity strEntityName
Verastream_Session.SetCurrentRecordIndex (2)
Set modRecord = Verastream_Session.GetCurrentRecord

For I = 1 To modRecord.Count
  MsgBox (modRecord.ElementNames(I) & " has a value of " & modRecord.Item(I))
Next
Set modRecord = Nothing

Verastream_Session.Disconnect
Set Verastream_Session = Nothing

GetCurrentRecordIndex Method

Retrieves the current record index of the current recordset.

Syntax

RecordIndex = object.GetCurrentRecordIndex

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
RecordIndex The recordset index

Remarks

Use the GetCurrentRecordIndex method to get the index of the current record in the current recordset.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntity As String
Dim strAttrName, strAttrValue, strIndex As String
Dim Attributes As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strEntityName = "CustInquiryPanel"
Verastream_Session.SetCurrentEntity strEntityName

strAttrName = "AcctNumber"
strAttrValue = "167439459"
Set Attributes = New AppConnStringMap
Attributes.Add strAttrName, strAttrValue
Verastream_Session.SetAttributes Attributes
    
strEntityName = "AcctTransactions"
Verastream_Session.SetCurrentEntity strEntityName
Verastream_Session.SetCurrentRecordIndex (1)
strIndex = Verastream_Session.GetCurrentRecordIndex
MsgBox ("Current record index = " & strIndex)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing

GetCurrentRecordSetName Method

Method used to retrieve the name of the current recordset.

Syntax

RecordSetName = object.GetCurrentRecordSetName

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
RecordSetName The name of the current recordset

Remarks

Use the GetCurrentRecordSetName method to get the name of the current recordset.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntity As String
Dim strAttrName, strAttrValue, strRecordset, strRecordsetOut As String
Dim Attributes As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strEntityName = "CustInquiryPanel"
Verastream_Session.SetCurrentEntity strEntityName

strAttrName = "AcctNumber"
strAttrValue = "167439459"
Set Attributes = New AppConnStringMap
Attributes.Add strAttrName, strAttrValue
Verastream_Session.SetAttributes Attributes
    
strEntityName = "AcctTransactions"
Verastream_Session.SetCurrentEntity strEntityName

strRecordset = "AcctTransData"
Verastream_Session.SetCurrentRecordSetByName strRecordset

strRecordsetOut = Verastream_Session.GetCurrentRecordSetName
MsgBox ("Current record set is = " & strRecordsetOut)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing

GetEntityAttributes Method

Retrieves the attribute names for the named entity.

Syntax

Set EntityAttributes = object.GetEntityAttributes (EntityName)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
EntityName The name of the entity
EntityAttributes An AppConnStringList with the names of the attributes

Remarks

Use the GetEntityAttributes method to get the name of the attributes for the given entity.

Example

Dim Verastream_Session As AppConnModel
Dim AttributeList As AppConnStringList
Dim strModelName, strServerName, strEntity, strAttribute  As String

strModelName = "CCSDemo"
strServerName = "localhost"
strEntity = "SignonPanel"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

Set AttributeList = Verastream_Session.GetEntityAttributes(strEntity)

For I = 1 To (AttributeList.Count)
    strAttribute = AttributeList.Item(I)
    MsgBox ("Attribute = " & strAttribute)
Next

Verastream_Session.Disconnect
Set AttributeList = Nothing
Set Verastream_Session = Nothing

GetEntityDescription Method

Retrieves the description for the named entity.

Syntax

Description = object.GetEntityDescription(EntityName)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
EntityName The name of the entity
Description The description of the entity

Remarks

Use the GetEntityDescription method to get the description for the given entity.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntityDescr, strEntity As String

strModelName = "CCSDemo"
strServerName = "localhost"
strEntity = "AcctTransactions"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName
strEntityDescr = Verastream_Session.GetEntityDescription(strEntity)
MsgBox ("Entity description = " & strEntityDescr)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing

GetEntityOperations Method

Method used to retrieve the names of the operations for the named entity.

Syntax

Set Operations = object.GetEntityOperations(EntityName)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
EntityName The name of the entity
Operations An AppConnStringList with the names of the operations

Remarks

Use the GetEntityOperations method to get a list of the operations for the given entity.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntity As String
Dim EntityOperations As AppConnStringList

strModelName = "CCSDemo"
strServerName = "localhost"
strEntity = "AcctTransactions"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName
Set EntityOperations = Verastream_Session.GetEntityOperations(strEntity)
For I = 1 To EntityOperations.Count
    MsgBox ("Entities operations = " & EntityOperations(I))
Next

Verastream_Session.Disconnect
Set Verastream_Session = Nothing

GetEntityRecordSets Method

Retrieves the recordset names for the named entity.

Syntax

Set RecordSets = object.GetEntityRecordSets(EntityName)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
EntityName The name of the entity
RecordSets An AppConnStringList with the names of the recordsets

Remarks

Use the GetEntityRecordSets method to get a list of the recordsets for the given entity.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntity As String
Dim EntityRecordsets As AppConnStringList

strModelName = "CCSDemo"
strServerName = "localhost"
strEntity = "AcctTransactions"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName
Set EntityRecordsets = Verastream_Session.GetEntityRecordSets(strEntity)
For I = 1 To EntityRecordsets.Count
    MsgBox ("Entities record sets = " & EntityRecordsets(I))
Next

Verastream_Session.Disconnect
Set Verastream_Session = Nothing

GetFieldLocations Method

Used to get the locations for the given fields.

Syntax

Locations = object.GetFieldLocations(FieldNames)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, AppConnTable, and AppConnSessionEx)
FieldNames The names of the fields
Locations The locations of the patterns

Remarks

Use the GetFieldLocations method to get locations of the given fields.

Recordset fields are always linear regions.

This method is guaranteed to work correctly only when a record in the recordset is selected. If no record is selected:

GetFieldMetaData Method

Retrieves the metadata for the named field from the named entity on the named recordset.

Syntax

Set FieldMetaData = object.GetFieldMetaData(EntityName, RecordSetName, FieldName)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
EntityName The name of the entity
RecordSetName The name of the recordset
FieldName The name of the field
FieldMetaData The metadata for the field

Remarks

Use the GetFieldMetaData method to get the metadata for the given field of the recordset on the entity.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName As String
Dim objMetaData As FieldMetaData
Dim strEntityName, strRecordsetName, strFieldName As String

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strEntityName = "AcctTransactions"
strRecordsetName = "AcctTransData"
strFieldName = "Date"
Set objMetaData = Verastream_Session.GetFieldMetaData(strEntityName, _
    strRecordsetName, strFieldName)

MsgBox ("Field metadata name is " & objMetaData.Name)
MsgBox ("Field metadata description is " & objMetaData.Description)
MsgBox ("Field metadata IsKey is " & objMetaData.IsKey)
MsgBox ("Field metadata IsReadable is " & objMetaData.IsReadable)
MsgBox ("Field metadata IsWritable is " & objMetaData.IsWriteable)
MsgBox ("Field metadata length is " & objMetaData.Length)
MsgBox ("Field metadata type is " & objMetaData.MetaDataType)
MsgBox ("Field metadata TerminalAttributesEnabled is " & objMetaData.TerminalAttributesEnabled)

Set objMetaData = Nothing
Verastream_Session.Disconnect
Set Verastream_Session = Nothing

GetHomeEntityName Method

Used to get the name of the home entity.

Syntax

EntityName = object.GetHomeEntityName

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, AppConnTable, and AppConnSessionEx)
EntityName The name of the home entity.

Remarks

Use the GetHomeEntityName method to get the name of the home entity defined in the model for the host system. If there is no home entity (for example, when the model contains no entities), this method returns "".

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntityName  As String

strModelName = "CCSDemo"
strServerName = "localhost"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName
strEntityName = Verastream_Session.GetHomeEntityName
MsgBox ("The home entity for the model is " & strEntityName)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing

GetLastRequestID Method

Gets an integer identifier for the most recent request performed against the current Host Integrator Server session.

Syntax

RequestID = object.GetLastRequestID

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
RequestID The unique identification number of the last request that was preformed

Remarks

Use the GetLastRequestID method to get the last request id on the current session, which can be used in referencing logging information.

Example

Dim Verastream_Session As AppConnSessionEx
Dim strModelName, strServerName, strEntity As String

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

MsgBox (Verastream_Session.GetLastRequestID)
Verastream_Session.SetCurrentEntity ("SignonPanel")
MsgBox (Verastream_Session.GetLastRequestID)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing

See also

ConnectToModel
ConnectToModelViaDomain
ConnectToSession
ConnectToSessionViaDomain
SuspendConnection
ResumeConnection

GetLocale Method

Retrieves the Locale for the AppConn object.

Syntax

Locale = object.GetLocale

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
Locale The locale designation

Remarks

Use the GetLocale method to get the locale of the AppConn object, which may be set with the SetLocale method.

Example

Dim Verastream_Session As AppConnModel
Dim strServerName, strDomainName, strModelName, strUserID, _
    strPassword, strLocale, strTempString As String
Dim ModelVars As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
strDomainName = "localhost"

Set ModelVars = New AppConnStringMap
strUserID = ""
strPassword = ""
ModelVars.Add "userID", "bjones"
ModelVars.Add "password", "bjones"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName, _
    strUserID, strPassword, ModelVars
If Not Verastream_Session.IsConnected Then
    MsgBox ("Verastream Not Connected")
Else
    MsgBox ("Verastream Connected")
End If

strLocale = "en_us"
Verastream_Session.SetLocale (strLocale)

strTempString = Verastream_Session.GetLocale
MsgBox ("The Verastream server locale is " & strTempString)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set ModelVars = Nothing

See also

SetLocale

GetLoggingLevel Method

Used to get the logging level for the session.

Syntax

LoggingLevel = object.GetLoggingLevel

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, AppConnTable, and AppConnSessionEx)
LoggingLevel A numeric logging level (i.e. Errors, ErrorsAndWarnings, or All)

Remarks

Use the GetLoggingLevel method to get the logging level for a session.

Example

Dim Verastream_Session As AppConnSessionEx
Dim strModelName, strServerName, strEntity As String

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

MsgBox ("The logging level for the Verastream Server is =" _
 & Verastream_Session.GetLoggingLevel)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing

See also

SetLoggingLevel

GetMajorVersion Method

Gets the major version for the AppConn object.

Syntax

object.GetMajorVersion

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)

Remarks

Use the GetMajorVersion method to get the major version number of the AppConn connector.

Example

Dim Verastream_Session As AppConnModel
Dim strServerName, strDomainName, strModelName, strUserID, _
    strPassword, tmpString  As String
Dim ModelVars As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
strDomainName = "localhost"

Set ModelVars = New AppConnStringMap
strUserID = ""
strPassword = ""
ModelVars.Add "userID", "bjones"
ModelVars.Add "password", "bjones"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName, _
    strUserID, strPassword, ModelVars
If Not Verastream_Session.IsConnected Then
    MsgBox ("Verastream Not Connected")
Else
    MsgBox ("Verastream Connected")
End If
tmpString = Verastream_Session.GetMajorVersion
MsgBox ("Major version = " & tmpString)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set ModelVars = Nothing

See also

GetMinorVersion

MetaDataOnly

Use this property to specify that the current session is "metadata only" or to find out if the current session is a metadata-only session.

Syntax

object.MetaDataOnly

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)

Remarks

This property is read/write if the session is not connected, and read-only if the session is connected.

A metadata only session does not require a host connection and allows only methods and properties that interact with metadata. You must set MetaDataOnly to true before you use a Connect method.

Once a connect method has been called, and before the Disconnect method has been called, any attempt to change the value of the MetaDataOnly property will generate an error with this text: "The MetaDataOnly property cannot be changed while a connection is active."

When a client connects with MetaDataOnly set to true, the server will not report the connection as a session, and will not allocate a new session or a session from a pool. There will be no indication in the Administrative WebStation or Session Monitor that there is an active client connection.

Example

	Set session = CreateObject("VeraStream.AppConnSessionEx")
	session.MetaDataOnly = True
	session.ConnectToModel "MyServer", "MyModel"
	…
	session.Disconnect

GetMethodTimeout Method

Retrieves the timeout value set on the AppConn connection.

Syntax

Timeout = object.GetMethodTimeout

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
Timeout The amount of time (milliseconds) methods will process before timing out

Remarks

Use the GetMethodTimeout method to get the timeout for methods of the AppConn object, which may be set with the SetMethodTimeout method.

Example

Dim Verastream_Session As AppConnModel
Dim strServerName, strDomainName, strModelName, strUserID, _
    strPassword, strMethodTimeout, strTempString As String
Dim ModelVars As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
strDomainName = "localhost"

Set ModelVars = New AppConnStringMap
strUserID = ""
strPassword = ""
ModelVars.Add "userID", "bjones"
ModelVars.Add "password", "bjones"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName, _
    strUserID, strPassword, ModelVars
If Not Verastream_Session.IsConnected Then
    MsgBox ("Verastream Not Connected")
Else
    MsgBox ("Verastream Connected")
End If

strMethodTimeout = "20000"
Verastream_Session.SetMethodTimeout (strMethodTimeout)
strTempString = Verastream_Session.GetMethodTimeout
MsgBox ("The Verastream server method timeout is " & strTempString)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set ModelVars = Nothing

See also

SetMethodTimeout

GetMinorVersion Method

Gets the minor version for the AppConn object.

Syntax

object.GetMinorVersion

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)

Remarks

Use the GetMinorVersion method to get the minor version number of the AppConn connector.

Example

Dim Verastream_Session As AppConnModel
Dim strServerName, strDomainName, strModelName, strUserID, _
    strPassword, tmpString  As String
Dim ModelVars As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
strDomainName = "localhost"

Set ModelVars = New AppConnStringMap
strUserID = ""
strPassword = ""
ModelVars.Add "userID", "bjones"
ModelVars.Add "password", "bjones"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName, _
    strUserID, strPassword, ModelVars
If Not Verastream_Session.IsConnected Then
    MsgBox ("Verastream Not Connected")
Else
    MsgBox ("Verastream Connected")
End If
tmpString = Verastream_Session.GetMinorVersion
MsgBox ("Minor version value = " & tmpString)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set ModelVars = Nothing

See also

GetMajorVersion

GetModelEntities Method

Retrieves the names of the entities for the model.

Syntax

Set ModelEntities = object.GetModelEntities

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
ModelEntities An AppConnStringList with the names of the entities

Remarks

Use the GetModelEntities method to get the a list of the entities defined in the model.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntity As String
Dim EntityList As AppConnStringList

strModelName = "CCSDemo"
strServerName = "localhost"
strEntity = "SignonPanel"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName
Set EntityList = Verastream_Session.GetModelEntities
For I = 1 To EntityList.Count
    MsgBox ("Model entities = " & EntityList(I))
Next

Verastream_Session.Disconnect
Set Verastream_Session = Nothing

LastErrorMessageList Property

Returns the error message strings associated with the most recent failed API call.

Syntax

object.LastErrorMessageList

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)

Remarks

Use the LastErrorMessageList method to get a list of the error message strings associated with the most recent failed API call.

ModelName Property

Returns the Verastream model name for the current session.

Syntax

object.ModelName

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)

Remarks

Use the ModelName property to get the name of the Host Integrator model for the current session. The model name is available even though a model name was not used to connect to the session (e.g. ConnectToSession)

Example

Dim Verastream_Session As AppConnModel
Dim strServerName, strDomainName, strModelName, strUserID, _
    strPassword, tmpString  As String
Dim ModelVars As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
strDomainName = "localhost"

Set ModelVars = New AppConnStringMap
strUserID = ""
strPassword = ""
ModelVars.Add "userID", "bjones"
ModelVars.Add "password", "bjones"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName, _
    strUserID, strPassword, ModelVars
If Not Verastream_Session.IsConnected Then
    MsgBox ("Verastream Not Connected")
Else
    MsgBox ("Verastream Connected")
End If
tmpString = Verastream_Session.ModelName
MsgBox ("The Verastream model name is = " & tmpString)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set ModelVars = Nothing

See also

GetSessionID
ServerName

GetModelVariableNames Method

Method used to return the names of all non-hidden model variables in the Host Integrator model.

Syntax

Set MVNames = object.GetModelVariableNames

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, AppConnTable, and AppConnSessionEx)
MVNames An AppConnStringList with the variable names

Remarks

Use the GetModelVariableNames method to get a list of all non-hidden model variables that are defined in the model.

GetModelVariables Method

Retrieves the model variable names and values.

Syntax

Set Variables = object.GetModelVariables

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
Variables An AppConnStringMap with name/value pairs of variables

Remarks

Use the GetModelVariables method to get the an AppConnStringMap of the names and values of the variables.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName As String
Dim ModelVars As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName
Set ModelVars = Verastream_Session.GetModelVariables
For I = 1 To ModelVars.Count
    MsgBox ("Model variable " & ModelVars.Keys(I) & " " & ModelVars.Item(I))
Next
ModelVars.Clear

Verastream_Session.Disconnect
Set Verastream_Session = Nothing

GetOperationMetaData Method

Retrieves the metadata for the given operation on the given entity.

Syntax

Set OperationMetaData = object.GetOperationMetaData(EntityName, OperationName)
Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
EntityName The name of the entity
OperationName The name of the operation
OperationMetaData The metadata for the operation

Remarks

Use the GetOperationMetaData method to get the metadata for the given operation of the given entity.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName As String
Dim strEntityName, strOperationName As String
Dim objMetaData As OperationMetaData
Dim Destinations, AttributesUsed, VariablesUsed As AppConnStringList

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strEntityName = "CustInquiryPanel"
strOperationName = "ToNameSearch"

Set objMetaData = Verastream_Session.GetOperationMetaData(strEntityName, _
        strOperationName)

MsgBox ("Operation metadata name is " & objMetaData.Name)
MsgBox ("Operation metadata Description is " & objMetaData.Description)
MsgBox ("Operation metadata Destination is " & objMetaData.Destination)
MsgBox ("Operation metadata IsDefault is " & objMetaData.IsDefault)
MsgBox ("Operation metadata MetaDataType is " & objMetaData.MetaDataType)
MsgBox ("Operation metadata Timeout is " & objMetaData.Timeout)

Set Destinations = objMetaData.AltDestinations
For I = 1 To Destinations.Count
    MsgBox ("Alternate destination: " & Destinations(I))
Next
Set Destinations = Nothing

Set AttributesUsed = objMetaData.AttributesUsed
For I = 1 To AttributesUsed.Count
    MsgBox ("Attributes used: " & AttributesUsed(I))
Next
Set AttributesUsed = Nothing

Set VariablesUsed = objMetaData.VariablesUsed
For I = 1 To VariablesUsed.Count
    MsgBox ("Variables used: " & VariablesUsed(I))
Next
Set VariablesUsed = Nothing

GetPatternLocations Method

Used to get the locations for the given patterns.

Syntax

Locations = object.GetPatternLocations(PatternNames)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, AppConnTable, and AppConnSessionEx)
PatternNames The names of the patterns
Locations The locations of the patterns

Remarks

Use the GetPatternLocations method to get locations of the given patterns.

GetProcedureMetaData Method

Used to retrieve the metadata from the named table for the named procedure.

Syntax

Set ProcedureMetaData = object.GetProcedureMetaData(TableName, ProcedureName)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
TableName The name of the table defined in Verastream
ProcedureName Then name of the procedure defined in the table
ProcedureMetaData The metadata for the column

Remarks

Use the GetProcedureMetaData method to get the metadata for the given procedure.

Example

Dim Verastream_Session As AppConnSessionEx
Dim ProcMetaData As ProcedureMetaData
Dim ProcStringList As AppConnStringList
Dim strModelName, strServerName As String

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

Set ProcMetaData = Verastream_Session.GetProcedureMetaData("Transactions", _
    "GetTransactions")

MsgBox ("Procedure name is " & ProcMetaData.Name)
MsgBox ("Procedure description is " & ProcMetaData.Description)
MsgBox ("Procedure metadata type is " & ProcMetaData.MetaDataType)
MsgBox ("Procedure type is " & ProcMetaData.ProcedureType)
MsgBox ("Is the procedure used for SQL?  " & ProcMetaData.UsedForSQL)

Set ProcStringList = ProcMetaData.FilterColumns
For I = 1 To ProcStringList.Count
    MsgBox ("Filter column " & I & " is " & ProcStringList(I))
    MsgBox ("Is " & ProcStringList(I) & " required? " & _
        ProcMetaData.IsRequiredFilter(ProcStringList(I)))
Next
ProcStringList.Clear

Set ProcStringList = ProcMetaData.InputColumns
For I = 1 To ProcStringList.Count
    MsgBox ("Input column " & I & " is " & ProcStringList(I))
    MsgBox ("Is " & ProcStringList(I) & " required? " & _
        ProcMetaData.IsRequiredInput(ProcStringList(I)))
Next
ProcStringList.Clear

Set ProcStringList = ProcMetaData.OutputColumns
For I = 1 To ProcStringList.Count
    MsgBox ("Output column " & I & " is " & ProcStringList(I))
Next
ProcStringList.Clear

Verastream_Session.Disconnect
Set ProcStringList = Nothing
Set ProcMetaData = Nothing
Set Verastream_Session = Nothing

GetRecordSetMetaData Method

Method used to retrieve the metadata for the named Recordset on the named entity.

Syntax

Set RecordSetMetaData = object.GetRecordSetMetaData (EntityName, RecordSetName)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
EntityName The name of the entity
RecordSetName The name of the recordset
RecordSetMetaData The metadata for the recordset

Remarks

Use the GetRecordSetMetaData method to get the metadata for the given recordset of the given entity.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName As String
Dim strEntityName, strRecordsetName, strScrollOper As String
Dim objMetaData As RecordSetMetaData
Dim appStringList As appConnStringList

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strEntityName = "AcctTransactions"
strRecordsetName = "AcctTransData"

Set objMetaData = Verastream_Session.GetRecordSetMetaData(strEntityName, strRecordsetName)

MsgBox ("Recordset name is " & objMetaData.Name)
MsgBox ("Recordset description is " & objMetaData.Description)
MsgBox ("Recordset type is " & objMetaData.MetaDataType)
MsgBox ("Recordset SupportsDirectInserts is " & objMetaData.SupportsDirectInserts)
MsgBox ("Recordset SupportsSelect is " & objMetaData.SupportsSelect)

Set appStringList = objMetaData.FieldNames
For I = 1 To appStringList.Count
    MsgBox ("Field name: " & appStringList(I))
Next
appStringList.Clear

Set appStringList = Nothing

Set objMetaData = Nothing
Verastream_Session.Disconnect
Set Verastream_Session = Nothing

GetRecordSetLocations Method

Used to get the locations for the given record sets.

Syntax

Locations = object.GetRecordSetLocations(RecordSetNames)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, AppConnTable, and AppConnSessionEx)
RecordSetNames The names of the record sets
Locations The locations of the record sets

Remarks

Use the GetRecordSetLocations method to get locations of the given record sets.

GetSessionID Method

Retrieves the identification number of the current session.

Syntax

SessionID = object.GetSessionID

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
SessionID The unique identification number of the session

Remarks

Use the GetSessionID method to get the current session id, which can be used in referencing logging information.

Example

Dim Verastream_Session As AppConnModel
Dim strServerName, strDomainName, strModelName, strUserID, _
    strPassword, tmpString  As String
Dim ModelVars As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
strDomainName = "localhost"

Set ModelVars = New AppConnStringMap
strUserID = ""
strPassword = ""
ModelVars.Add "userID", "bjones"
ModelVars.Add "password", "bjones"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName, _
    strUserID, strPassword, ModelVars
If Not Verastream_Session.IsConnected Then
    MsgBox ("Verastream Not Connected")
Else
    MsgBox ("Verastream Connected")
End If
tmpString = Verastream_Session.GetSessionID
MsgBox ("Session ID value = " & tmpString)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set ModelVars = Nothing

See also

ModelName
ServerName

GetStringAtOffset Method

Used to get a string from the current entity on the Verastream server starting at an offset of the given length.

Syntax

String = object.GetStringAtOffset(Offset, Length)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
Offset The offset of the string on the entity
Length The length of the string on the entity
String The text string from the entity at the given offset for the given length

Remarks

Use the GetStringAtOffset method to get strings where attributes or recordset fields have not been defined.

Example

Dim Verastream_Session As AppConnSessionEx
Dim strModelName, strServerName As String

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName
Verastream_Session.InsertStringAtOffset "testname", 1487

MsgBox ("The string at row 19, column 30 is " & _
    Verastream_Session.GetStringAtOffset(1487, 8))

Verastream_Session.Disconnect
Set Verastream_Session = Nothing

GetStringAtRowColumn Method

Used to get a string within a rectangular region from the current entity on the Verastream Server.

Syntax

String = object.GetStringAtRowColumn(TopRow, LeftColumn, NumRows, NumColumns)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
TopRow The top row of the entity (for example, screen)
LeftColumn The left column of the entity (for example, screen)
NumRows The number of rows of the entity (for example, screen)
NumColumns The number of columns of the entity (for example, screen)
String The text string from the entity at the given offset for the given length

Remarks

Use the GetStringAtRowColumn method to get strings where attributes or recordset fields have not been defined.

Example

Dim Verastream_Session As AppConnSessionEx
Dim strModelName, strServerName As String

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

Verastream_Session.InsertStringAtRowColumn "test name", 19, 48
MsgBox ("The string at row 19 column 48 is " & _
        Verastream_Session.GetStringAtRowColumn(19, 48, 1, 12))

Verastream_Session.Disconnect
Set Verastream_Session = Nothing

GetTableColumns Method

Used to retrieve the column names for a given table.

Syntax

Set TableColumns = object.GetTableColumns(TableName)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
TableName The name of the table defined in Verastream
TableColumns An AppConnStringList with the names of the columns

Remarks

Use the GetTableColumns method to get a list of the columns for the given procedure.

Example

Dim Verastream_Session As AppConnSessionEx
Dim strModelName, strServerName As String
Dim TableCol As AppConnStringList

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName
Set TableCol = Verastream_Session.GetTableColumns("Transactions")
For I = 1 To TableCol.Count
    MsgBox ("Transactions table column " & I & " is " & TableCol(I))
Next
TableCol.Clear

Verastream_Session.Disconnect
Set TableCol = Nothing
Set Verastream_Session = Nothing

GetTableDescription Method

Used to retrieve the description for the named table.

Syntax

Description = object.GetTableDescription(TableName)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
TableName The name of the table defined in Verastream
Description The description for the table

Remarks

Use the GetTableDescription method to get the description for the given table.

Example

Dim Verastream_Session As AppConnTable
Dim TableNames As AppConnStringList
Dim strModelName, strServerName, strTableDescr As String

strModelName = "CCSDemo"
strServerName = "localhost"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName
Set TableNames = Verastream_Session.GetTableNames

For i = 1 To TableNames.Count
    strTableDescr = Verastream_Session.GetTableDescription(TableNames(i))
    MsgBox ("The description for the table named " & TableNames(i) _
            & " is " & strTableDescr)
Next

Verastream_Session.Disconnect
Set TableNames = Nothing
Set Verastream_Session = Nothing

GetTableNames Method

Method used to retrieve the table names.

Syntax

Set TableNames = object.GetTableNames

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, AppConnTable, and AppConnSessionEx)
TableNames An AppConnStringList with the table names

Remarks

Use the GetTableNames method to get a list of the names of the tables that are defined in the model.

Example

Dim Verastream_Session As AppConnModel
Dim TableNames As AppConnStringList
Dim strModelName, strServerName As String

strModelName = "CCSDemo"
strServerName = "localhost"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName
Set TableNames = Verastream_Session.GetTableNames

For i = 1 To TableNames.Count
    MsgBox ("Table " & i & " is " & TableNames(i))
Next

Verastream_Session.Disconnect
Set TableNames = Nothing
Set Verastream_Session = Nothing

GetTableProcedures Method

Used to retrieve the tables defined for the named table.

Syntax

Set TableProcedures = object.GetTableProcedures

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
TableProcedures An AppConnStringList of the procedure names

Remarks

Use the GetTableNames method to get a list of the names of the tables that are defined in the model.

Example

Dim Verastream_Session As AppConnTable
Dim ProcedureNames, TableNames As AppConnStringList
Dim strModelName, strServerName As String

strModelName = "CCSDemo"
strServerName = "localhost"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName
Set TableNames = Verastream_Session.GetTableNames

For i = 1 To TableNames.Count
    Set ProcedureNames = Verastream_Session.GetTableProcedures(TableNames(i))
    For j = 1 To ProcedureNames.Count
        MsgBox ("The table " & TableNames(i) & " has a procedure named " _
            & ProcedureNames(j))
    Next
Next

Verastream_Session.Disconnect
Set ProcedureNames = Nothing
Set TableNames = Nothing
Set Verastream_Session = Nothing

GetTerminalFieldAtCursor Method

Used to get the field at the cursor defined in the Verastream model for the host application.

Syntax

TerminalField = object.GetTerminalFieldAtCursor

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, AppConnTable, and AppConnSessionEx)
TerminalField A terminal field

Remarks

Use the GetTerminalFieldAtCursor method to get the field at the cursor defined in the Verastream model for the host application.

GetVariableMetaData Method

Retrieves the metadata for the named variable.

Syntax

Set VariableMetaData = object.GetVariableMetaData (VariableName)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
VariableName The name of the variable
VariableMetaData The metadata for the variable

Remarks

Use the GetVariableMetaData method to get the metadata for the given variable.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strVariableName As String
Dim objVariableMetaData As VariableMetaData

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strVariableName = "cursorPosition"
Set objVariableMetaData = Verastream_Session.GetVariableMetaData(strVariableName)

MsgBox ("Variable metadata name is " & objVariableMetaData.Name)
MsgBox ("Variable metadata default value is " & objVariableMetaData.DefaultValue)
MsgBox ("Variable metadata description is " & objVariableMetaData.Description)
MsgBox ("Variable metadata initialization is " & objVariableMetaData.Initialization)
MsgBox ("Variable metadata IsEncrypted is " & objVariableMetaData.IsEncrypted)
MsgBox ("Variable metadata IsHidden is " & objVariableMetaData.IsHidden)
MsgBox ("Variable metadata IsReadable is " & objVariableMetaData.IsReadable)
MsgBox ("Variable metadata IsWriteable is " & objVariableMetaData.IsWriteable)
MsgBox ("Variable metadata meta data type is " & objVariableMetaData.MetaDataType)
MsgBox ("Variable metadata variable type is " & objVariableMetaData.VariableType)

Verastream_Session.Disconnect
Set objVariableMetaData = Nothing
Set Verastream_Session = Nothing

GetVersionString Method

Gets the version string for the AppConn object.

Syntax

object.GetVersionString

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)

Remarks

Use the GetVersionString method to get the version information about the AppConn connector.

Example

Dim Verastream_Session As AppConnModel
Dim strServerName, strDomainName, strModelName, strUserID, _
    strPassword, tmpString  As String
Dim ModelVars As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
strDomainName = "localhost"

Set ModelVars = New AppConnStringMap
strUserID = ""
strPassword = ""
ModelVars.Add "userID", "bjones"
ModelVars.Add "password", "bjones"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName, _
    strUserID, strPassword, ModelVars
If Not Verastream_Session.IsConnected Then
    MsgBox ("Verastream Not Connected")
Else
    MsgBox ("Verastream Connected")
End If
tmpString = Verastream_Session.GetVersionString
MsgBox ("Version string value = " & tmpString)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set ModelVars = Nothing

InsertRecord Method

Inserts a record into a Verastream recordset.

Syntax

object.InsertRecord Record

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
Record An AppConnStringMap with name/value pairs for the fields of a record

Remarks

Use the InsertRecord method to insert a record into a Verastream recordset.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntityName, strAttrName, strAttrValue As String
Dim recordMap As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName
  
strEntityName = "CustInquiryPanel"
Verastream_Session.SetCurrentEntity strEntityName
If StrComp(Verastream_Session.GetCurrentEntity, strEntityName) <> 0 Then
    MsgBox ("Set Current Entity Error")
End If
    
strAttrName = "AcctNumber"
strAttrValue = "167439459"
Set Attributes = New AppConnStringMap
Attributes.Add strAttrName, strAttrValue
Verastream_Session.SetAttributes Attributes
    
strEntityName = "AcctTransactions"
Verastream_Session.SetCurrentEntity strEntityName
If StrComp(Verastream_Session.GetCurrentEntity, strEntityName) = 0 Then
    Set recordMap = New AppConnStringMap
    recordMap.Clear
    recordMap.Add "Date", "04-18-03"
    recordMap.Add "Code", "B6"
    recordMap.Add "Amount", "100.00"
    Verastream_Session.InsertRecord recordMap
Else
    MsgBox ("Set Current Entity Error")
End If
    
Verastream_Session.Disconnect
Set recordMap = Nothing
Set Verastream_Session = Nothing

InsertRecords Method

Used to insert a set of records into a record set defined in the Verastream model.

Syntax

object.InsertRecords Records

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, AppConnTable, and AppConnSessionEx)
Records A set of records (AppConnStringMaps)

Remarks

Use the InsertRecords method to insert a set of records into a record set defined in the Verastream model.

InsertStringAtCursor Method

Used to insert a string to a host application at the cursor.

Syntax

object.InsertStringAtCursor String

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, AppConnTable, and AppConnSessionEx)
String A string

Remarks

Use the InsertStringAtCursor method to insert a string to a host application at the cursor.

Example

Dim Verastream_Session As AppConnSessionEx
Dim strModelName, strServerName As String
Dim Verastream_StringMap As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

'  This is adding the string into the "UserID" attribute location
Verastream_Session.InsertStringAtCursor ("bjones")

Set Verastream_StringMap = New AppConnStringMap
Verastream_StringMap.Add "password", "bjones"
Verastream_Session.SetAttributes Verastream_StringMap
Verastream_StringMap.Clear
Verastream_Session.SetCurrentEntity ("MainMenu")

MsgBox ("The host is on entity " & Verastream_Session.GetCurrentEntity)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set Verastream_StringMap = Nothing

InsertStringAtOffset Method

Used to insert a string into the current entity on the Verastream server starting at an offset.

Syntax

object.InsertStringAtOffset String, Offset

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
String The text string to put on the entity at the given offset
Offset The row and column coordinates on a terminal screen.

Remarks

Use the InsertStringAtOffset method to put strings where attributes or recordset fields have not been defined.

Example

Dim Verastream_Session As AppConnSessionEx
Dim strModelName, strServerName As String

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName
Verastream_Session.InsertStringAtOffset "testname", 1487

MsgBox ("The string at row 19, column 30 is " & _
    Verastream_Session.GetStringAtOffset(1487, 8))

Verastream_Session.Disconnect
Set Verastream_Session = Nothing

InsertStringAtRowColumn Method

Used to insert a string into the current entity on the Verastream server starting at the given row and column.

Syntax

object.InsertStringAtRowColumn String, Row, Column

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
String The text string to insert on the entity at the given offset.
Row The row number on the entity.
Column The column number on the entity.

Remarks

Use the InsertStringAtRowColumn method to put strings where attributes or recordset fields have not been defined.

Example

Dim Verastream_Session As AppConnSessionEx
Dim strModelName, strServerName As String

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

Verastream_Session.InsertStringAtRowColumn "test name", 19, 48
MsgBox ("The string at row 19 column 48 is " & _
        Verastream_Session.GetStringAtRowColumn(19, 48, 1, 12))

Verastream_Session.Disconnect
Set Verastream_Session = Nothing

IsConnected Property

Returns whether or not the object is connected to a Verastream session.

Syntax

object.IsConnected

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)

Remarks

Use the IsConnected property to determine if the object is connected to a Verastream session.

Example

Dim Verastream_Session As AppConnModel
Dim strServerName, strModelName, strUserID, strPassword As String
Dim ModelVars As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"

Set ModelVars = New AppConnStringMap

strUserID = ""
strPassword = ""
ModelVars.Add "userID", "bjones"
ModelVars.Add "password", "bjones"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName, _
                    strUserID, strPassword, ModelVars
If Not Verastream_Session.IsConnected Then
    MsgBox ("Verastream Not Connected")
Else
    MsgBox ("Verastream Connected")
End If

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set ModelVars = Nothing

See also

ConnectToModel
ConnectToModelViaDomain
ConnectToSession
ConnectToSessionViaDomain
SuspendConnection
ResumeConnection, and Disconnect.

IsSecureConnection Property

Returns whether or not the connection to a Verastream session is secure.

Syntax

object.IsSecureConnection

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)

Remarks

Use the IsSecureConnection property to determine if the connection to a Verastream session is secure.

Example

Dim Verastream_Session As AppConnModel
Dim strServerName, strDomainName, strModelName, strUserID, _
    strPassword, tmpString  As String
Dim ModelVars As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
strDomainName = "localhost"

Set ModelVars = New AppConnStringMap
strUserID = ""
strPassword = ""
ModelVars.Add "userID", "bjones"
ModelVars.Add "password", "bjones"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName, _
    strUserID, strPassword, ModelVars
If Not Verastream_Session.IsConnected Then
    MsgBox ("Verastream Not Connected")
Else
    MsgBox ("Verastream Connected")
End If
tmpString = Verastream_Session.IsSecureConnection
MsgBox ("The Verastream session is secure = " & tmpString)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set ModelVars = Nothing

See also

IsConnected

ModelVersionString Property

Gets the version string for the current model.

Syntax

object.ModelVersionString

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)

Remarks

The string returned uniquely identifies the version of the model deployed to the Host Integrator Server.

MoveCurrentRecordIndex Method

Moves the record index for a Verastream recordset.

Syntax

object.MoveCurrentrecordIndex Movement

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
Movement An enumeration value defined below indicating the scroll movement

Remarks

Use the MoveCurrfentRecordIndex method to move the index in a Verastream recordset. The enumeration values for AppConnScrollMovement are defined in the Type Library.

Scroll Movement values - ScrollHome, ScrollEnd, ScrollLineUp, ScrollLineDown, ScrollPageUp and ScrollPageDown

Example


Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntityName, strAttrName, strAttrValue As String
Dim modRecord As AppConnModelRecord
Dim Attributes As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strEntityName = "CustInquiryPanel"
Verastream_Session.SetCurrentEntity strEntityName

strAttrName = "AcctNumber"
strAttrValue = "167439459"
Set Attributes = New AppConnStringMap
Attributes.Add strAttrName, strAttrValue
Verastream_Session.SetAttributes Attributes
Set Attributes = Nothing
    
strEntityName = "AcctTransactions"
Verastream_Session.SetCurrentEntity strEntityName
Verastream_Session.MoveCurrentRecordIndex ScrollPageDown
Set modRecord = Verastream_Session.GetCurrentRecord

For I = 1 To modRecord.Count
  MsgBox (modRecord.ElementNames(I) & " has a value of " & modRecord.Item(I))
Next
Set modRecord = Nothing

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set Attributes = Nothing
Set modRecord = Nothing

NextRecord Method

Moves the record index for a Verastream recordset to the next record that matches the filter expression and retrieves that record.

Syntax

Set Record = object.NextRecord([FilterExpression])

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
FilterExpression [optional] An expression used to filter which record to get
Record A record with the fields names and values

Remarks

Use the NextRecord method to set the record index in a Verastream recordset to the next record that matches the filter expression (if no filter expression is given, it moves to the next record) and retrieve that record. If no record is found a record with index of -1 is returned.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntityName, strAttrName, _
    strAttrValue, strFilter As String
Dim modRecord As AppConnModelRecord
Dim Attributes As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strEntityName = "CustInquiryPanel"
Verastream_Session.SetCurrentEntity strEntityName

strAttrName = "AcctNumber"
strAttrValue = "167439459"
Set Attributes = New AppConnStringMap
Attributes.Add strAttrName, strAttrValue
Verastream_Session.SetAttributes Attributes
Set Attributes = Nothing
    
strEntityName = "AcctTransactions"
Verastream_Session.SetCurrentEntity strEntityName

' this gets the first record in the record set since there is no filter criteria
Set modRecord = Verastream_Session.NextRecord
For I = 1 To modRecord.Count
  MsgBox (modRecord.ElementNames(I) & " has a value of " & modRecord.Item(I))
Next

' this gets the next record based on the filter expression
strFilter = "AcctTransactions.Code = E6"
Set modRecord = Verastream_Session.NextRecord(strFilter)
For I = 1 To modRecord.Count
  MsgBox (modRecord.ElementNames(I) & " has a value of " & modRecord.Item(I))
Next
Set modRecord = Nothing

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set Attributes = Nothing

PerformAidKey Method

Used to enter the aid key (for example, a Program Function key) into the current Verastream server session.

Syntax

object.PerformAidKey AidKey

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
AidKey The AppConnAidKey enumerated value, like IBM_Enter for the Enter key, that represents an aid key that will be executed on the host system. The enumeration values for AppConnAidKey enumeration are defined in the Type Library.

Remarks

Use the PerformAidKey method to have the host system process the selected aid key.

Example

On Error GoTo error_Handler

Dim Verastream_Session As AppConnSessionEx
Dim strModelName, strServerName As String

strModelName = "SuperPool"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToSession strServerName, strModelName
Verastream_Session.PerformEntityOperation "SetCursor"
Verastream_Session.InsertStringAtCursor "tst"
Verastream_Session.PerformAidKey IBM_Tab_Key
Verastream_Session.InsertStringAtCursor "testpass"
Verastream_Session.PerformAidKey IBM_Enter_Key

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Exit Sub

error_Handler:
    MsgBox "Verastream error", vbExclamation, "Verastream Error"

PerformEntityOperation Method

Used to perform an entity operation.

Syntax

object.PerformEntityOperation OperationName

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
OperationName The name of the operation to performed on the current entity

Remarks

Use the InsertRecord method to perform an operation defined for an entity.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strOperationName, strCurrentEntity As String

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strOperationName = "ToMainMenu"
Verastream_Session.PerformEntityOperation strOperationName
strCurrentEntity = Verastream_Session.GetCurrentEntity
MsgBox ("The current entity is " & strCurrentEntity)

Verastream_Session.Disconnect

PerformTableProcedure Method

Used to perform a procedure on the Verastream server.

Syntax

Set RecordSet = object.PerformTableProcedure(TableName, ProcedureName, [DataInputValues], [FilterValues], [FilterIsCaseSensitive], [OutputColumnNames], [MaxRows])

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
TableName The name of the table defined in Verastream
ProcedureName The name of the procedure for the table
DataInputValues [optional] An AppConnStringMap with name/value pairs for the procedure inputs
FilterValues [optional] An AppConnStringMap with name/value pairs for the procedure filters
FilterIsCaseSensitive [optional] An indicator whether or not the filter is case sensitive
OutputColumnNames [optional] An AppConnStringList with the names of the columns to retrieve
MaxRows [optional] The maximum number of rows that will be fetched
RecordSet The set of records returned for the procedure

Remarks

Use the PerformTableProcedure method to execute a procedure.

Example

Dim Verastream_Session As AppConnTable
Dim strModelName, strServerName, strTableName, strProcedureName As String
Dim strMap As AppConnStringMap
Dim ReturnRS As AppConnRecordSet

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnTable
Verastream_Session.ConnectToModel strServerName, strModelName

Set strMap = New AppConnStringMap
Set ReturnRS = New AppConnRecordSet

strTableName = "Transactions"
strProcedureName = "GetTransactions"
strMap.Add "AcctNumber", 167439459

Set ReturnRS = Verastream_Session.PerformTableProcedure(strTableName, strProcedureName, Null, strMap)

Dim VHIRecord As AppConnRecord
For i = 1 To ReturnRS.Count
    Set VHIRecord = ReturnRS.Item(i)
    MsgBox (VHIRecord!Date)
Next

ProcessString Method

Calls the ProcessString event handler on the server.

Syntax

StringA = object.ProcessString(StringB)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
StringB The inputstring to be processed by the ProcessString event handler.
StringA The results returned by the ProcessString event handler.

RequireSecureConnection Method

Sets the AppConn object to require that all subsequent connections to a session be secure.

Syntax

object.RequireSecureConnection require

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
require True or False

Remarks

Use the RequireSecureConnection method to set the AppConn connector so that subsequent connections to a session be secure.

Example

Dim Verastream_Session As AppConnModel
Dim strServerName, strDomainName, strModelName, strUserID, _
    strPassword, tmpString  As String
Dim ModelVars As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
strDomainName = "localhost"

Set ModelVars = New AppConnStringMap
strUserID = ""
strPassword = ""
ModelVars.Add "userID", "bjones"
ModelVars.Add "password", "bjones"

Set Verastream_Session = New AppConnModel
Verastream_Session.RequireSecureConnection True

Verastream_Session.ConnectToModel strServerName, strModelName, _
    strUserID, strPassword, ModelVars
If Not Verastream_Session.IsConnected Then
    MsgBox ("Verastream Not Connected")
Else
    MsgBox ("Verastream Connected")
End If
tmpString = Verastream_Session.IsSecureConnection
MsgBox ("The session is securely connected = " & tmpString)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set ModelVars = Nothing

ResumeConnection Method

Resumes the connection to a Verastream session that has been suspended earlier.

Syntax

object.ResumeConnection(ConnectionToken)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
ConnectionToken The token that was returned from the SuspendConnection method

Remarks

Use the ResumeConnection method to resume a Verastream session where state has been maintained.

Example

Set ModelVars = New AppConnStringMap
strUserID = ""
strPassword = ""
ModelVars.Add "userID", "bjones"
ModelVars.Add "password", "bjones"

Set Verastream_Session = New AppConnModel
Verastream_Session.RequireSecureConnection True

Verastream_Session.ConnectToModel strServerName, strModelName, _
    strUserID, strPassword, ModelVars
If Not Verastream_Session.IsConnected Then
    MsgBox ("Verastream Not Connected")
Else
    MsgBox ("Verastream Connected")
End If

'  The session token would be written out to a session variable, a cookie or maybe a DB
strTimeout = "1"
strConnectionToken = Verastream_Session.SuspendConnection(strTimeout)
MsgBox ("The Verastream session is suspended and the token value is " _
        & strConnectionToken)

'  The session token would be fetched from where it was stored
Verastream_Session.ResumeConnection (strConnectionToken)
MsgBox ("The Verastream connection has been resumed")

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set ModelVars = Nothing

See also

ConnectToModel
ConnectToModelViaDomain
ConnectToSession
ConnectToSessionViaDomain
SuspendConnection
Disconnect

SelectCurrentRecord Method

Used to perform the select operation defined in Verastream model for the current record in the current recordset.

Syntax

object.SelectCurrentRecord

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)

Remarks

Use the SelectCurrentRecord method to perform the select operation defined in a Verastream record set where the host application has select functionality defined for that recordset. To determine if the record set is selectable, check the Operations definitions for a record set defined within the modeling tool.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntity As String
Dim strAttrName, strAttrValue, strIndex As String
Dim Attributes As AppConnStringMap
Dim modRecord As AppConnModelRecord

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strEntityName = "CustInquiryPanel"
Verastream_Session.SetCurrentEntity strEntityName

strAttrName = "AcctNumber"
strAttrValue = "167439459"
Set Attributes = New AppConnStringMap
Attributes.Add strAttrName, strAttrValue
Verastream_Session.SetAttributes Attributes
    
strEntityName = "AcctTransactions"
Verastream_Session.SetCurrentEntity strEntityName
Verastream_Session.SetCurrentRecordIndex (1)
Verastream_Session.SelectCurrentRecord
For I = 1 To modRecord.Count
  MsgBox (modRecord.ElementNames(I) & " has a value of " & modRecord.Item(I))
Next
Set modRecord = Nothing

Verastream_Session.Disconnect
Set Verastream_Session = Nothing

SelectRecordByFilter Method

Used to perform the select operation on the first record in the current recordset which matches the filter expression.

Syntax

object.SelectRecordByFilter FilterExpression

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
FilterExpression An expression used to filter which record will be selected

Remarks

Use the SelectRecordByFilter method to perform the select operation defined in Verastream on the first record that matches the filter expression where the host application has select functionality defined for that recordset.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntity, _
    strAttrName, strAttrValue, strFilterExpression As String
Dim Attributes As AppConnStringMap
Dim modRecord As AppConnModelRecord

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strEntityName = "CustInquiryPanel"
Verastream_Session.SetCurrentEntity strEntityName

strAttrName = "AcctNumber"
strAttrValue = "167439459"
Set Attributes = New AppConnStringMap
Attributes.Add strAttrName, strAttrValue
Verastream_Session.SetAttributes Attributes
    
strEntityName = "AcctTransactions"
Verastream_Session.SetCurrentEntity strEntityName

strFilterExpression = "AcctTransData.Code=""B6"""
MsgBox (strFilterExpression)
Verastream_Session.SelectRecordByFilter strFilterExpression
Set modRecord = Verastream_Session.GetCurrentRecord

For I = 1 To modRecord.Count
  MsgBox (modRecord.ElementNames(I) & " has a value of " & modRecord.Item(I))
Next
Set modRecord = Nothing

Verastream_Session.Disconnect
Set Verastream_Session = Nothing

SelectRecordByIndex Method

Used to perform the select operation on the first record in the current recordset for the given index.

Syntax

object.SelectCurrentRecord Index

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
Index The index of the record

Remarks

Use the SelectRecordByIndex method to perform the select operation on the record for the given index defined in a Verastream record set where the host application has select functionality defined for that recordset. To determine if the record set is selectable, check the Operations definitions for a record set defined within the modeling tool.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntity, _
    strAttrName, strAttrValue, strIndex As String
Dim Attributes As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strEntityName = "CustInquiryPanel"
Verastream_Session.SetCurrentEntity strEntityName

strAttrName = "AcctNumber"
strAttrValue = "167439459"
Set Attributes = New AppConnStringMap
Attributes.Add strAttrName, strAttrValue
Verastream_Session.SetAttributes Attributes
    
strEntityName = "AcctTransactions"
Verastream_Session.SetCurrentEntity strEntityName
strIndex = "1"
Verastream_Session.SelectRecordByIndex (strIndex)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing

ServerName Property

Returns the Verastream server name for the current session.

Syntax

object.ServerName

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)

Remarks

Use the ServerName property to get the name of Verastream server for the current session. The server name is available even though a server name was not used to connect to the session (for example, ConnectToModelViaDomain).

Example

Dim Verastream_Session As AppConnModel
Dim strServerName, strDomainName, strModelName, strUserID, _
    strPassword, strTempString As String
Dim ModelVars As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
strDomainName = "localhost"

Set ModelVars = New AppConnStringMap
strUserID = ""
strPassword = ""
ModelVars.Add "userID", "bjones"
ModelVars.Add "password", "bjones"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName, _
    strUserID, strPassword, ModelVars
If Not Verastream_Session.IsConnected Then
    MsgBox ("Verastream Not Connected")
Else
    MsgBox ("Verastream Connected")
End If

strTempString = Verastream_Session.ServerName
MsgBox ("The Verastream server is named " & strTempString)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set ModelVars = Nothing

See also

GetSessionID
ModelName

SetLocale Method

Sets the Locale for the AppConn object.

Syntax

object.SetLocale Locale

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
Locale The locale designation

Remarks

Use the SetLocale method to set the locale of the AppConn object, which may be retrieved with the GetLocale method.

Example

Dim Verastream_Session As AppConnModel
Dim strServerName, strDomainName, strModelName, strUserID, _
    strPassword, strLocale, strTempString As String
Dim ModelVars As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
strDomainName = "localhost"

Set ModelVars = New AppConnStringMap
strUserID = ""
strPassword = ""
ModelVars.Add "userID", "bjones"
ModelVars.Add "password", "bjones"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName, _
    strUserID, strPassword, ModelVars
If Not Verastream_Session.IsConnected Then
    MsgBox ("Verastream Not Connected")
Else
    MsgBox ("Verastream Connected")
End If

strLocale = "en_us"
Verastream_Session.SetLocale (strLocale)

strTempString = Verastream_Session.GetLocale
MsgBox ("The Verastream server locale is " & strTempString)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set ModelVars = Nothing

See also

GetLocale

SetLoggingLevel Method

Used to set the logging level for the session.

Syntax

object.SetLoggingLevel LoggingLevel

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, AppConnTable, and AppConnSessionEx)
LoggingLevel A logging level (i.e. Errors, ErrorsAndWarnings, or All)

Remarks

Use the SetLoggingLevel method to set the logging level for a session.

Example

On Error GoTo error_Handler

Dim Verastream_Session As AppConnSessionEx
Dim strModelName, strServerName As String

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

Verastream_Session.SetLoggingLevel All
MsgBox ("The logging level for the Verastream Server is =" _
 & Verastream_Session.GetLoggingLevel)

Verastream_Session.SetLoggingLevel Errors
MsgBox ("The logging level for the Verastream Server is =" _
 & Verastream_Session.GetLoggingLevel)

Verastream_Session.SetLoggingLevel ErrorsAndWarnings
MsgBox ("The logging level for the Verastream Server is =" _
 & Verastream_Session.GetLoggingLevel)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Exit Sub

error_Handler:
    MsgBox "Verastream error", vbExclamation, "Verastream Error"

See also

GetLoggingLevel

SessionType Property

Gets the terminal emulation type of the host session.

Syntax

object.SessionType

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)

Remarks

Use the SessionType property to get the terminal emulation type of the host session. The enumeration values for AppConnSessionType are defined in the Type Library.

Session Type
SessionType3270
SessionType5250
SessionTypeHP
SessionTypeVT

SetAttributes Method

Used to set attributes on the current entity.

Syntax

object.SetAttributes Attributes

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
Attributes An AppConnStringMap with name/value pairs for the attributes

Remarks

Use the SetAttributes method to set the attributes of the host application.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName As String
Dim strEntityName As String
Dim strAttrName, strAttrValue As String

strModelName = "CCSDemo"
strServerName = "localhost"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName
 
strEntityName = "CustInquiryPanel"
  
Verastream_Session.SetCurrentEntity strEntityName
If StrComp(Verastream_Session.GetCurrentEntity, strEntityName) <> 0 Then
    MsgBox ("Set Current Entity Error")
End If
    
strAttrName = "AcctNumber"
strAttrValue = "167439459"
Set Attributes = New AppConnStringMap
Attributes.Add strAttrName, strAttrValue
Verastream_Session.SetAttributes Attributes
    
Verastream_Session.Disconnect
Set Verastream_Session = Nothing

SetAttributesDelayed Method

Used to set attributes for the named entity when that entity is reached.

Syntax

object.SetAttributesDelayed Attributes, EntityName

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
Attributes An AppConnStringMap with name/value pairs for the attributes
EntityName The name of the entity

Remarks

Use the SetAttributesDelayed method to set the attributes of the host application.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntity, _
    strAttrName, strAttrValue As String
Dim Attributes As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strAttrName = "AcctNumber"
strAttrValue = "167439459"
strEntityName = "CustInquiryPanel"
Set Attributes = New AppConnStringMap
Attributes.Add strAttrName, strAttrValue

Verastream_Session.SetAttributesDelayed Attributes, strEntityName
Verastream_Session.SetCurrentEntity strEntityName

strEntityName = "AcctProfile"
Verastream_Session.SetCurrentEntity strEntityName

strEntityName = Verastream_Session.GetCurrentEntity
MsgBox ("The current entity in the host session is " & strEntityName)
Verastream_Session.Disconnect
Set Verastream_Session = Nothing

SetCurrentEntity

Used to traverse to an entity (for example, screen) of the host application.

Syntax

object.SetCurrentEntity EntityName

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
EntityName The name of the entity

Remarks

Use the SetCurrentEntity method to traverse to the named entity.

Reasons for failure include:

  1. Server session has not been established
  2. Invalid entity name
  3. No traversal path to entity

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntityName As String
	
strModelName = "CCSDemo"
strServerName = "localhost"
strEntityName = "CustInquiryPanel"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

Verastream_Session.SetCurrentEntity strEntityName
If StrComp(Verastream_Session.GetCurrentEntity, strEntityName) <> 0 Then
	MsgBox ("Set Current Entity Error")
End If

Verastream_Session.Disconnect
Set Verastream_Session = Nothing

SetCurrentRecordIndex Method

Used to set the index of the current recordset.

Syntax

object.SetCurrentRecordIndex Index

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
Index The index of the record

Remarks

Use the SetCurrentRecordIndex method to set the record index for the current recordset.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntity As String
Dim strAttrName, strAttrValue, strIndex As String
Dim Attributes As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strEntityName = "CustInquiryPanel"
Verastream_Session.SetCurrentEntity strEntityName

strAttrName = "AcctNumber"
strAttrValue = "167439459"
Set Attributes = New AppConnStringMap
Attributes.Add strAttrName, strAttrValue
Verastream_Session.SetAttributes Attributes
    
strEntityName = "AcctTransactions"
Verastream_Session.SetCurrentEntity strEntityName
Verastream_Session.SetCurrentRecordIndex (1)
strIndex = Verastream_Session.GetCurrentRecordIndex
MsgBox ("Current record index = " & strIndex)
Verastream_Session.Disconnect
Set Verastream_Session = Nothing

SetCurrentRecordSetByName Method

Used to set the current recordset by name.

Syntax

object.SetCurrentRecordSetByName RecordSetName

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
RecordSetName The name of the recordset

Remarks

Use the SetCurrentRecordSetByName method to set the current recordset.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName, strEntity As String
Dim strAttrName, strAttrValue, strRecordset, strRecordsetOut As String
Dim Attributes As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strEntityName = "CustInquiryPanel"
Verastream_Session.SetCurrentEntity strEntityName

strAttrName = "AcctNumber"
strAttrValue = "167439459"
Set Attributes = New AppConnStringMap
Attributes.Add strAttrName, strAttrValue
Verastream_Session.SetAttributes Attributes
    
strEntityName = "AcctTransactions"
Verastream_Session.SetCurrentEntity strEntityName

strRecordset = "AcctTransData"
Verastream_Session.SetCurrentRecordSetByName strRecordset

strRecordsetOut = Verastream_Session.GetCurrentRecordSetName
MsgBox ("Current record set is = " & strRecordsetOut)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing

SetMethodTimeout Method

Sets the timeout value set on the AppConn connection.

Syntax

object.SetMethodTimeout Timeout

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
Timeout The amount of time (milliseconds) methods will process before timing out

Remarks

Use the SetMethodTimeout method to set the timeout for methods of the AppConn object, which may be retrieved with the GetMethodTimeout method.

Example

Dim Verastream_Session As AppConnModel
Dim strServerName, strDomainName, strModelName, strUserID, _
    strPassword, strMethodTimeout, strTempString As String
Dim ModelVars As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
strDomainName = "localhost"

Set ModelVars = New AppConnStringMap
strUserID = ""
strPassword = ""
ModelVars.Add "userID", "bjones"
ModelVars.Add "password", "bjones"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName, _
    strUserID, strPassword, ModelVars
If Not Verastream_Session.IsConnected Then
    MsgBox ("Verastream Not Connected")
Else
    MsgBox ("Verastream Connected")
End If

strMethodTimeout = "20000"
Verastream_Session.SetMethodTimeout (strMethodTimeout)
strTempString = Verastream_Session.GetMethodTimeout
MsgBox ("The Verastream server method timeout is " & strTempString)

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set ModelVars = Nothing

See also

GetMethodTimeout

SetModelVariables Method

Used to set model variables.

Syntax

object.SetModelVariables Variables

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
Variables An AppConnStringMap with name/value pairs for the variables

Remarks

Use the SetModelVariables method to set model variables.

Example

Dim Verastream_Session As AppConnModel
Dim strModelName, strServerName As String
Dim ModelVars As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

Set ModelVars = New AppConnStringMap
ModelVars.Clear
ModelVars.Add "userID", "test1"
ModelVars.Add "password", "test2"
Verastream_Session.SetModelVariables ModelVars
ModelVars.Clear

Set ModelVars = Verastream_Session.GetModelVariables

For I = 1 To ModelVars.Count
    MsgBox ("Model variable " & ModelVars.Keys(I) & " " & ModelVars.Item(I))
Next

Verastream_Session.Disconnect
Set Verastream_Session = Nothing

SuspendConnection Method

Suspends the connection to a Verastream session so that the connection to that session can be resumed later.

Syntax

ConnectionToken = object.SuspendConnection(Timeout)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
Timeout The amount of time (minutes) the suspended connection will be held suspended
ConnectionToken The token used to resume the connection with ResumeConnection method

Remarks

Use the SuspendConnection method to maintain the state of a Verastream session while an AppConn connector is persisted with the intent that the connection to that session will be resumed.

Example

Set ModelVars = New AppConnStringMap
strUserID = ""
strPassword = ""
ModelVars.Add "userID", "bjones"
ModelVars.Add "password", "bjones"

Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName, _
    strUserID, strPassword, ModelVars
If Not Verastream_Session.IsConnected Then
    MsgBox ("Verastream Not Connected")
Else
    MsgBox ("Verastream Connected")
End If

'  The session token would be written out to a session variable, a cookie or maybe a DB
strTimeout = "1"
strConnectionToken = Verastream_Session.SuspendConnection(strTimeout)
MsgBox ("The Verastream session is suspended and the token value is " _
        & strConnectionToken)

'  The session token would be fetched from where it was stored
Verastream_Session.ResumeConnection (strConnectionToken)
MsgBox ("The Verastream connection has been resumed")

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Set ModelVars = Nothing

See also

ConnectToModel
ConnectToModelViaDomain
ConnectToSession
ConnectToSessionViaDomain
ResumeConnection
Disconnect

UpdateCurrentRecord Method

Used to update the current record in a Verastream recordset.

Syntax

object.UpdateCurrentRecord Record

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
Record An AppConnStringMap with name/value pairs for the record fields

Remarks

Use the UpdateCurrentRecord method to update the current record in a Verastream recordset.

UpdateRecordByFilter Method

Used to update a record in a Verastream recordset that matches a filter condition.

Syntax

Updated = object.UpdateRecordByFilter(Record, FilterExpression)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
Record An AppConnStringMap with name/value pairs for the record fields
FilterExpression An expression used to filter which record will be selected
Update Indicator whether or not a record is updated

Remarks

Use the UpdateRecordByFilter method to update the first record in a Verastream recordset that matches a filter condition.

UpdateRecordByIndex Method

Used to update a record in a Verastream recordset for the given index.

Syntax

Updated = object.UpdateRecordByIndex(Record, Index)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
Record An AppConnStringMap with name/value pairs for the record.
Index The index of a record
Update Indicator whether or not a record is updated

Remarks

Use the UpdateRecordByIndex method to update a record in a Verastream recordset for a given index.

UpdateRecords Method

Used to update records in a Verastream recordset match a filter condition.

Syntax

NumRecordsUpdated = object.UpdateRecords (Record, FilterExpression)

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
Record An AppConnStringMap with name/value pairs for the record fields
FilterExpression An expression used to filter which record will be selected
NumRecordsUpdated Then number of records that were updated

Remarks

Use the UpdateRecords method to update records in a Verastream recordset that match the filter expression.

WaitForCondition Method

Used to wait for the given conditions to be met on the given entity.

Syntax

object.WaitForCondition Timeout, [Expression], [EntityName]

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, AppConnTable, and AppConnSessionEx)
Timeout The amount of time to wait for the conditions to be meet
Expression [optional] A conditional expression
EntityName [optional] The name of the entity

Remarks

Use the WaitForCondition method to wait for conditions to be met on the given entity. If the entity name is not supplied the current entity will be assumed. If the timeout expires before the conditions are met an error will be raised.

WaitForEntityChange Method

Used to wait for the host application to reach an entity.

Syntax

object.WaitForEntityChange EntityName, Timeout

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
EntityName The name of the entity
Timeout The amount of time in seconds to wait before timing out

Remarks

Use the WaitForEntityChange method to synchronize session actions by waiting for the host to reach an entity.

WaitForCursor Method

Used to synchronize a host application by waiting for the terminal cursor at the given row and column.

Syntax

object.WaitForCursor RowNum, ColumnNum, Timeout

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
RowNum The row on the entity (for example, screen)
ColumnNum The column on the entity (for example, screen)
Timeout The amount of time in seconds to wait for the cursor to reach the given position

Remarks

Use the WaitForCursor method to synchronize processing with a host session.

Example

On Error GoTo error_Handler

Dim Verastream_Session As AppConnSessionEx
Dim strModelName, strServerName As String
Dim Verastream_StringMap As AppConnStringMap

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName
'Verastream_Session.WaitForCursor 19, 45, 1  ' will error out
Verastream_Session.WaitForCursor 19, 48, 1  ' will succeed

MsgBox ("Cursor it at the correct location.")

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Exit Sub

error_Handler:
    MsgBox "The cursor is not in the correct location after 1 second.", _
			vbExclamation, "Verastream Error"

WaitForString Method

Used to synchronize a host application by waiting for a string at the given row and column.

Syntax

object.WaitForString String, RowNum, ColumnNum, Timeout

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
String The text string to wait to appear
RowNum The row on the entity (for example, screen)
ColumnNum The column on the entity (for example, screen)
Timeout The amount of time in seconds to wait for the cursor to reach the given position

Remarks

Use the WaitForString method to synchronize processing with a host session.

Example

Dim Verastream_Session As AppConnSessionEx
Dim strModelName, strServerName, strField As String

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strField = "Consolidated"  ' this will work
'strField = "Consolidated2" ' this will throw an error
Verastream_Session.WaitForString strField, 17, 25, 1
MsgBox ("WaitForString completed successfully!")

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Exit Sub

error_Handler:
    MsgBox "String " & strField & " Not Found", vbExclamation, "Verastream Error"

WaitForStringRelCursor Method

Used to synchronize a host application by waiting for a string at an offset relative to the cursor position.

Syntax

object.WaitForStringRelCursor String, RowOffset, ColumnOffset, Timeout

Part Description
object An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable)
String The text string to wait to appear
RowOffset The offset from the cursor for the row on the entity
ColumnOffset The offset from the cursor for the column on the entity
Timeout The amount of time in seconds to wait for the cursor to reach the given position

Remarks

Use the WaitForStringRelCursor method to synchronize processing with a host session.

Example

On Error GoTo error_Handler

Dim Verastream_Session As AppConnSessionEx
Dim strModelName, strServerName, strField As String

strModelName = "CCSDemo"
strServerName = "localhost"
Set Verastream_Session = New AppConnModel
Verastream_Session.ConnectToModel strServerName, strModelName

strField = "Userid"  ' this will work
'strField = "Userid2" ' this will throw an error

'  On the same row as the cursor and 18 columns to the left
Verastream_Session.WaitForStringRelCursor strField, 0, -18, 1
MsgBox ("WaitForStringRelCursor completed successfully!")

Verastream_Session.Disconnect
Set Verastream_Session = Nothing
Exit Sub

error_Handler:
    MsgBox "String " & strField & " Not Found", vbExclamation, "Verastream Error"

 

 

  Attachmate