ISolveInterface.GetValues (method)

Gets a list of values based on the item ID and the attribute list.
Syntax: SCODE = object.GetValues ( itemId, attributeList, values )
itemId As String - The item Id for the attribute list.
attributeList As String - The list of attributes to look for.
values As VARIANT* - Pass in an existing CoCimSafeArray3 object. It will be filled in with a two dimensional array of VARIANTs. Column one contains the index of the attribute. Column two contains the data as a VARIANT. This will be the value VT_NULL if the entry in the database is NULL. Column three contains the data's type as a string. (Note: In VBScript and VBA/VB, you may pass a Variant and this function will return a native array.)
Description: browser.GetValues queries the database with the item Id to find the matching attributes. If successful return S_OK and a variant array. If the query fails then a value of S_FALSE is returned. If the array is empty then no values were returned.


Dim i As Variant
Dim errorCode As Long
Dim errorString As String
Dim low As Long
Dim high As Long
Dim values As Variant
Set values = CreateObject("CIMPLICITY.CimSafeArray.3")
i = browser.GetValues("1", "Order Card.C;Order Card.Master Blend Date", values)
If CInt(i) = 0 Then
  values.GetArrayBounds 1, low, high
  MsgBox "Number of values = " + CStr(high - low + 1)
  For j = low To high
    If IsNull(values.Element2(j, 1)) Then
      MsgBox "Index = " + CStr(values.Element2(j, 0)) _
             + ", Data = <NULL>" _
             + ", Type = " + CStr(values.Element2(j, 2))
      MsgBox "Index = " + CStr(values.Element2(j, 0)) _
             + ", Data = " + CStr(values.Element2(j, 1)) _
             + ", Type = " + CStr(values.Element2(j, 2))
    End If
  i = browser.LastError(errorCode, errorString)
  MsgBox "Error code = " + CStr(errorCode) + ", Error string = " + errorString
End If