Microsoft KB Archive/312733

= BUG: The Carriage Return Delimiter Is Skipped If a Field Delimiter for Optional Field Is Present =

Article ID: 312733

Article Last Modified on 6/4/2003

-

APPLIES TO


 * Microsoft BizTalk Server 2000 Standard Edition
 * Microsoft BizTalk Server 2002 Standard Edition

-



This article was previously published under Q312733



SYMPTOMS
If the last field in a record is optional, you may receive a parsing error that is similar to the following one when a delimiter exists for the optional field and the optional field itself is empty:

While parsing record &quot;RootNode&quot;, the parser cannot find the required trailing delimiter: &quot; &quot; (0x000d).

The parser failed to convert the document due to processing errors. See the following messages for details.

However, you do not receive this error if the optional field is at the beginning of the record.

For example, you receive the parsing error with the following fields in INFIX order (where * is specified as the field delimiter and Carriage Return is specified as the record delimiter)

Test1*Test2*Test3*

whereas the following set of fields parse without error (where both Test1 and Test3 are optional fields):


 * Test1*Test2*Test3



CAUSE
This problem may occur if you enable the Skip Carriage Return property at the record level for documents that use Carriage Return as the record delimiter and the delimiter for an optional field is present even though the optional field itself is empty.

In this case, enabling the Skip Carriage Return property causes the carriage return after the field delimiter to be interpreted as part of a field and therefore it is skipped; a parsing error is generated because the skipped carriage return is the record delimiter.



RESOLUTION
To parse the document correctly, you can use any of the following methods:
 * If the record delimiter that is set on the root node is Carriage Return, set the Skip Carriage Return property to No for both the root node and for the record that contains the fields.
 * If the record delimiter that is set on the root node is Carriage Return, change the record delimiter, and then set the Skip Carriage Return property to Yes for both the root node and the record that contains the fields.
 * Add a space after the last delimiter to cause the optional field to be generated with a blank value.
 * If you do not want to modify the specification and you do not want the optional field to be generated at all, remove the last field delimiter for that record.



STATUS
Microsoft has confirmed that this is a problem in Microsoft BizTalk Server 2002.

Keywords: kbbug kbnofix KB312733

-

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

© Microsoft Corporation. All rights reserved.