Microsoft KB Archive/183555

= Size Of Dynamic Output Array Always Set to Maximum =

Article ID: 183555

Article Last Modified on 3/10/2004

-

APPLIES TO


 * Microsoft COM Transaction Integrator for CICS and IMS 1.0, when used with:
 * Microsoft SNA Server 4.0

-



This article was previously published under Q183555



SYMPTOMS
When a Visual Basic programmer uses the UBound function to obtain a count of the actual number of elements returned in an array, the result always indicates the maximum possible value, even though fewer elements may actually have been returned in the first (or only) array dimension.



CAUSE
The COM Transaction Integrator creates the safe array that is returned to the Visual Basic program. The dimension(s) of the returned array will always be set to the maximum, because the COMTI runtime component has no means of determining the actual number of elements returned without incurring excessive processing overhead.



STATUS
Microsoft has confirmed this to be a problem in Microsoft COM Transaction Integrator for CICS and IMS version 1.0 included with SNA Server version 4.0.

This problem was corrected in the latest SNA Server version 4.0 U.S. Service Pack. For information on obtaining this Service Pack, query on the following word in the Microsoft Knowledge Base (without the spaces):

S E R V P A C K



MORE INFORMATION
Steps to Reproduce:


 * 1) In Component Builder (CB), declare a method for which there is a parameter declared as an output array.
 * 2) The parameter is the final output field returned.
 * 3) The method's advanced properties specify that the "Final field from host is bounded." (Specifying the property, "Final field from host is bounded" for the method indicates that the number of values returned in the first array dimension can vary up to a specified maximum number.)
 * 4) The front-end client program written in Visual Basic declares this array as a dynamic array.

Keywords: kbbug kbfix KB183555

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.