Framework EDI Reference. Methods and Properties
ediSchemas. Import

Imports all schema information.

Syntax:

Returns:

Returns 1 if the operation is successful; otherwise the operation returns zero.

Remarks:

The Import method immediately imports all schema information that has been specified to be used for processing the EDI document.  The LoadSchema method of the IediDocument interface specifies the schemas individually that will  be referenced when the EDI document is being processed.  The LoadSchema method does not immediately import the information, and only imports when the process of translating begins, activated by calls like the LoadEDI method, or when the process of generating begins, activated by such calls as CreateInterchange method.

Example:

Dim oEdiDoc As Fredi.ediDocument
Dim oSchemas As Fredi.ediSchemas
Dim oSef1 As Fredi.ediSchema
Dim oSef2 As Fredi.ediSchema   
Set oEdiDoc = New Fredi.ediDocument
Set oSchemas = oEdiDoc.GetSchemas   
' Specify the schemas to use.
Set oSef = oEdiDoc.LoadSchema(App.Path & "\850.sef", 0)
Set oSef = oEdiDoc.LoadSchema(App.Path & "\850A.sef", 0)   
' Import the schemas' information now.
oSchemas.Import   
oEdiDoc.LoadEdi App.Path & "\850.x12"

  Samples: