The DefinedSize property for strings in COMTI recordsets is set to one extra character (318558)



The information in this article applies to:

  • Microsoft Host Integration Server 2000
  • Microsoft Host Integration Server 2000 SP1

This article was previously published under Q318558

SYMPTOMS

When Microsoft COM Transaction Integrator (COMTI) creates an ADODB recordset, the DefinedSize property for a string field is set to one character more than what is defined in the COMTI type library. When you use the recordset to provide input to the COMTI method and then a string field is filled with string data for the number of characters that is specified in the DefinedSize property, the COMTI method call will fail and you will receive a COMTI 102 error message that contains the following description if the COMTI string parameter has not been set to truncate additional data:

(1513) Character string parameter AcctRS in method getaccts exceeds the maximum size; truncation is not allowed. The COM Transaction Integrator runtime has determined that the length of the converted input character string exceeds the maximum length specified in the COM Transaction Integrator component library and that the specified conversion mapping does not permit truncating the string. Check the application program. If no errors are discovered consider allowing truncation or increasing the allowable length of the converted character string.

CAUSE

Any Microsoft Component Object Model (COM)-aware programming language can access COMTI. Some languages do not work directly with string data and the null terminator must be included specifically as a part of the returned data. The additional defined character allows for the null terminator.

STATUS

This behavior is by design.

MORE INFORMATION

To work around this behavior, use one of these two methods:
  • When you program with languages such as Microsoft Visual Basic, set the maximum length of the string to be the DefinedSize - 1.
  • Change the parameter definition in the COMTI type library to allow the field to be truncated if it is too long. To this on the COBOL tab in the properties of the field. By default, you will receive an error message if the field contains more data than the parameter is defined for. If you set this option, you will not receive any warning messages if any data is truncated.

Modification Type:MajorLast Reviewed:6/21/2004
Keywords:kbfix kbbug kbinfo KB318558 kbAudDeveloper kbAudITPRO