The importer classes can easily be used in own applications by using the CommandLineParser class as the central point of operation. Each parameter that can be set with the command line parser is a public property of the class, but in this case you have to read the methods, which deal with the macros to find out which ones to set.

So it is easier to create a parameter file with the standalone importers in interactive mode and then load it from code. Here's a simple example:

procedure ImportFlashFilerFiles(const ParameterFileName: AnsiString);

begin

{ Clear command line parser values }

 CommandLineParser.ClearValues;

{ Read parameter file }

 CommandLineParser.ProcessParameterFile(ParameterFileName);

{ Source engine: FlashFiler }

 ucnxiFlashFilerEngine.CreateSourceEngine;

{ Destination engine: Nexus }

 ucnxiNexusEngine.CreateDestinationEngine;

{ Structure converter: Dictionary }

 ucnxiDictionaryConverter.CreateStructureConverter;

{ Data mover: Standard }

 ucnxiBasicDataMover.CreateDataMover;

{ Transfer Manager: Standard }

 ucnxiTransferManager.CreateTransferManager;

{ Run }

 TransferManager.RunBatch;

{ Free used objects to avoid problems with the finalization sequence }

 FreeAndNil(DataMover);

 FreeAndNil(StructureConverter);

 FreeAndNil(DestinationEngine);

 FreeAndNil(SourceEngine);

 FreeAndNil(TransferManager);

end;

Home | Site Contents | Documentation | NexusDB Manual V4 | Management Tools | The Importer | Implementation Details