Framework EDI Reference. Methods and Properties
ediDocument. LoadEdi

Loads an EDI document.

Syntax:

Parameters:

Returns

Returns 1 if the operation is successful; otherwise the operation returns zero.  (Please note, a successful return (1) does not neccessarily mean that the file was recognized as a valid EDI file.)

Remarks

The LoadEdi method initiates the read of an EDI file. This means that any options, properties, delimiters, implementation guidelines, etc., that is pertinent to the file for reading, has to be set before this method is called. If no external implementation guideline file is specified, then the standard reference is automatically used. The standard version being used will be the version that is read from the EDI file.

When the cursor type is set to Dynamic (default), the entire EDI file is loaded during the call of the LoadEdi method.  If the the cursor type is set to Forward, then the LoadEdi method does not load the EDI file, but only opens it.

If the "LoadSchema" method was used to load a schema (SEF file), then the schema will actually get loaded during the "LoadEdi" method.  Also during this time when the EDI file is getting loaded, FREDI checks it against the schema for correctness.  Any discrepancy between the EDI file and the schema is an error, which will get saved in the ediWarning object.  Note, that the value returned by the LoadEdi method does not indicate the validity of the EDI file. 

Example.

Dim oEdiDoc As Fredi.ediDocument
Set oEdiDoc = New ediDocument:

oEdiDoc.LoadEdi “C:\FILES\850.X12”