Opens MapInfo MIF/MID file for import specifying two name fields.
Syntax
intl pipImportOpenMIF2 ( pipImporter imp_h, pstr fileName, pstr nameField, pstr nameField2 );
Arguments
imp_h The handle returned by pipImportInit for the current import process. Input.
fileName The complete path and filename of the MIF file to import. Input.
nameField The field name to use as the primary identifier field. If nameField is NULL, contains an empty string, or contains a field name that does not exist in the MIF file, the first column provides the identifier. Input.
nameField2 The field name to use as the secondary identifier field. If NULL, there is no secondary identifier. Input.
Return Value
PIP_OK PIP_ERROR
Prerequisites
pipImportInit.
Alternates
pipImportOpenBNA, pipImportOpenShape, or pipImportOpenTab.
Notes
This function opens a MapInfo MIF/MID file for importing. The supported structure of a MIF/MID file is detailed in on page 202.
A MIF/MID file comprises two files, one with a .mif extension and the other with a .mid extension. Both files must be present, or this function fails.
The fileName parameter should identify only the MIF file. The MID file is assumed to have the same base name, the extension MID, and be in the same directory as the MIF file.
The nameField specifies the field name from which each imported object's primary name is read. If you specify an invalid field, pipImportOpenMIF2 defaults to the first column and generates an explanatory message. Precisely recommends calling pipErrorGet immediately after pipImportOpenMIF2 to retrieve these messages.
The coordinates in the MIF/MID file must correspond to the coordSys parameter in the structure passed to the pipImportInit function.
Example
See pipImportInit.