Click any of the following methods or properties to see information on its use, syntax, and parameters:
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 |
The parameters userID and password are used by Verastream Server if the security option is ON.
Reasons for failure include:
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
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 |
Reasons for failure include:
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
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.
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 |
Reasons for failure include:
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
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 |
Reasons for failure include:
The parameters userID and password are used by Verastream Server if the security option is ON.
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
object.Disconnect([Reserved])
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
Reserved | [optional] Reserved parameter |
Use the Disconnect method to end the connection to a Verastream session.
Reasons for failure include:
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
Use this property to specify the error count.
object.ErrorCount
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
AttributeName = object.GetAttributeAtCursor
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
AttributeName |
The name of the attribute |
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
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 |
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 |
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
Retrieves the attributes of the current entity.
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 |
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
Sets the AppConn object to return terminal attribute information when retrieving a recordset.
object.EnableTerminalAttributes enable
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
enable |
True or False |
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
Used to execute an SQL statement to return a recordset.
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 |
Use the ExecuteSQLStatement method to execute an SQL statement.
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
Used to execute an SQL statement to return a recordset, specifying maximum rows.
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 |
Use the ExecuteSQLStatement method to execute an SQL statement while specifying a maximum number of rows to be returned.
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 |
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
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.
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. |
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).
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 |
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
CurrentEntity = object.GetCurrentEntity
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
CurrentEntity |
The name of the entity |
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
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 |
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
RecordIndex = object.GetCurrentRecordIndex
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
RecordIndex |
The recordset index |
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
RecordSetName = object.GetCurrentRecordSetName
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
RecordSetName |
The name of the current recordset |
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
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 |
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
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 |
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
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 |
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
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 |
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
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 |
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:
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 |
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
EntityName = object.GetHomeEntityName
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, AppConnTable, and AppConnSessionEx) |
EntityName | The name of the home entity. |
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
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 |
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
Locale = object.GetLocale
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
Locale | The locale designation |
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
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) |
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
object.GetMajorVersion
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
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
object.MetaDataOnly
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
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.
Set session = CreateObject("VeraStream.AppConnSessionEx") session.MetaDataOnly = True session.ConnectToModel "MyServer", "MyModel" … session.Disconnect
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 |
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
object.GetMinorVersion
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
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
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 |
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
Returns the error message strings associated with the most recent failed API call.
object.LastErrorMessageList
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
Use the LastErrorMessageList method to get a list of the error message strings associated with the most recent failed API call.
object.ModelName
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
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
Set MVNames = object.GetModelVariableNames
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, AppConnTable, and AppConnSessionEx) |
MVNames | An AppConnStringList with the variable names |
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 |
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
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 |
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
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 |
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 |
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
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 |
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
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 |
SessionID = object.GetSessionID
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
SessionID | The unique identification number of the session |
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
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 |
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
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 |
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
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 |
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
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 |
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
Set TableNames = object.GetTableNames
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, AppConnTable, and AppConnSessionEx) |
TableNames | An AppConnStringList with the table names |
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
Set TableProcedures = object.GetTableProcedures
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
TableProcedures | An AppConnStringList of the procedure names |
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
TerminalField = object.GetTerminalFieldAtCursor
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, AppConnTable, and AppConnSessionEx) |
TerminalField | A terminal field |
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 |
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
object.GetVersionString
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
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
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 |
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
object.InsertRecords Records
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, AppConnTable, and AppConnSessionEx) |
Records | A set of records (AppConnStringMaps) |
object.InsertStringAtCursor String
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, AppConnTable, and AppConnSessionEx) |
String | A string |
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
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. |
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
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. |
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
object.IsConnected
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
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
object.IsSecureConnection
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
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
Gets the version string for the current model.
object.ModelVersionString
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
The string returned uniquely identifies the version of the model deployed to the Host Integrator Server.
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 |
Scroll Movement values - ScrollHome, ScrollEnd, ScrollLineUp, ScrollLineDown, ScrollPageUp and ScrollPageDown
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
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 |
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
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. |
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"
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 |
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
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 |
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
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. |
object.RequireSecureConnection require
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
require | True or False |
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
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 |
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
object.SelectCurrentRecord
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
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
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 |
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
object.SelectCurrentRecord Index
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
Index |
The index of the record |
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
object.ServerName
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
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
object.SetLocale Locale
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
Locale |
The locale designation |
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
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) |
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"
object.SessionType
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
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 |
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 |
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
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 |
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
object.SetCurrentEntity EntityName
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
EntityName | The name of the entity |
Reasons for failure include:
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
object.SetCurrentRecordIndex Index
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
Index | The index of the record |
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
object.SetCurrentRecordSetByName RecordSetName
Part | Description |
object | An AppConn object (for example, AppConnModel, AppConnTerm, and AppConnTable) |
RecordSetName | The name of the recordset |
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
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 |
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
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 |
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
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 |
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
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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"
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 |
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"
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 |
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"
© 1999-2007 Attachmate Corporation. All rights reserved. Terms of Use.