AppConnRecordSet Object

Use the AppConnRecordSet object to manage recordsets.

Click a method to see more information on its use, syntax, and parameters:

Count Property

Used to get the number of records in the recordset.

Syntax

object.Count

Part Description
object An AppConnRecordSet object

Remarks

Use the Count property to get the number of records in a recordset.

Example

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
Set Records = Verastream_Session.FetchRecords

MsgBox ("There are " & Records.Count & " records in the recordset")
    
Verastream_Session.Disconnect
Set Verastream_Session = Nothing

FromXMLString Method

Used to set a recordset from an XML representation.

Syntax

object.FromXMLString(Record)

Part Description
object A recordset object
Record An XML representation of the recordset

Remarks

Use the FromXMLString method to set a recordset from an XML representation.

GetElementMetaData Method

Used to get the metadata for an element of the records in a recordset.

Syntax

Set MetaData = object.GetElementMetaData(Index)

Part Description
object A recordset object
Index The name or index(starting at 1) of an element in the list
MetaData The RecordSetMetaData object for the given record

Remarks

Use the GetElementMetaData method to get the metadata of an element in the records of a recordset.

Item Property

Used to get an AppConnRecord in an AppConnRecordSet.

Syntax

Set Record = object.Item(Index)

Set Record = object(Index)

Part Description
object A AppConnRecordSet object
Index An index (starting at 1) of a record in the recordset
Record An AppConnRecord

Remarks

Use the Item property to get an AppConnRecord in an AppConnRecordSet.

Example

Dim Verastream_Session  As AppConnModel
Dim Records             As AppConnRecordSet
Dim Record              As AppConnRecord
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
Set Records = Verastream_Session.FetchRecords

Set Record = Records(1)
Set Record = Records.Item(1)

Verastream_Session.Disconnect
Set Records = Nothing
Set Record = Nothing
Set Verastream_Session = Nothing

NumElements Property

Used to get the number of elements in the records of the records.

Syntax

object.NumElements

Part Description
object A recordset object

Remarks

Use the NumElements property to get the number of elements in the records of a recordset.

Example

Dim Verastream_Session  As AppConnModel
Dim Records             As AppConnRecordSet
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
Set Records = Verastream_Session.FetchRecords
MsgBox ("There are " & Records.NumElements & " elements in a record in the recordset")

Verastream_Session.Disconnect
Set Records = Nothing
Set Verastream_Session = Nothing

ToXMLString Method

Used to get an XML representation of the recordset.

Syntax

XMLString = object.ToXMLString([URLDTD])

Part Description
object A recordset object
URLDTD [optional] The URL of a DTD that will be used to validate the XML
XMLString An XML representation of the recordset

Remarks

Use the ToXMLString method to get an XML representation of the recordset.

Example

Dim Verastream_Session  As AppConnModel
Dim Records             As AppConnRecordSet
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
Set Records = Verastream_Session.FetchRecords

MsgBox (Records.ToXMLString)

Verastream_Session.Disconnect
Set Records = Nothing
Set Verastream_Session = Nothing

 

 

  Attachmate