Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

This article was previously published under Q312733

↑ Back to the top


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 "RootNode", the parser cannot find the required trailing delimiter: " " (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

↑ Back to the top


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.

↑ Back to the top


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.

↑ Back to the top


Status

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

↑ Back to the top


Keywords: KB312733, kbnofix, kbbug

↑ Back to the top

Article Info
Article ID : 312733
Revision : 4
Created on : 6/4/2003
Published on : 6/4/2003
Exists online : False
Views : 426