ItemType method


Purpose

The ItemType method returns the type of the value in a specified item in a bag. This method corresponds to the MQAI call, "mqInquireItemInfo," in the Programmable command formats reference.


Format

    ItemType (Selector, ItemIndex, ItemType)


Parameters

    Selector (VARIANT) - input
    Selector identifying the item to be inquired.

    MQSEL_ANY_USER_SELECTOR is the default. If the Selector parameter is not of type long, MQRC_SELECTOR_TYPE_ERROR results.

    ItemIndex (LONG) - input
    Index of items to be inquired.

    MQIND_NONE is the default.

    ItemType (LONG) - output
    Data type of the specified item. Note: Either the Selector parameter, ItemIndex parameter, or both must be specified. If neither parameter is present, MQRC_PARAMETER_MISSING results.


Visual Basic Language Invocation

To return the type of a value:
ItemType = mqbag.ItemType([Selector],
[ItemIndex])