Framework EDI Reference. Methods and Properties
ediDocument. ReadNextDataSegment

Returns the next data segment that contain unverified data from the document.

Syntax:

Returns:

Returns an object of type FREDI.ediDataSegment.  The ReadNextDataSegment returns empty (NULL or nullptr) if the call fails, or if the EDI document is empty, or if the end of the document has been reached.

Remarks:

The ReadNextDataSegment returns the next data segment in the document from the preceding data segment that was returned by a call made by FirstDataSegment, or from a previous ReadNextDataSegment call.

The values extracted from the document are contained in the individual data elements of the data segment.  The values are not verified against a schema.  For data verification, use the ediDataSegment.NextDataSegment instead.

Because data is not verified, the ReadNextDataSegment method is a faster way of extracting data than the ediDataSegment.NextDataSegment method.

Example

:
Set oSegment = oEdiDoc.FirstDataSegment
While Not oSegment Is Nothing
:
    Set oSegment = oEdiDoc.ReadNextDataSegment
:
Wend