LookupTable.LoadValues
LookupTable.LoadValues
The LoadValues method loads a text file into the Passport LookupTable object, which then becomes the object's current data source. The key-value pairs used in the data file are combinations of strings and integers, as specified by the nFormat parameter.
Syntax
Function LookupTable.LoadValues(bstrFilename, nFormat) As Long
Parameters
- bstrFilename
Indicates the name of the file for use as data.
- nFormat
Specifies the format of the data.
Return values
This method has no return value.
Example
For an example of this method, see LookupTable.Value.
Remarks
The LoadValues method (and the LookupTable object) can keep only one data file in memory at any given time. If you load a new file, it will replace the object's current data.
The bstrFilename parameter is a locally specified file path. It cannot be specified as an https:// address and does not need the file:// protocol tag. Files should consist of key-value pairs separated by commas, with each pair separated by carriage returns. The Dictionaries supplied in the Microsoft® .NET Passport Software Development Kit (SDK) follow this convention; if you want to create a custom lookup table, use the supplied Dictionaries as templates. If a key or value is longer than a line, use the slash character (\) as a continuation character.
Allowed nFormat parameter values are:
nFormat Description 0 String keys, string values. 1 String keys, integer values. 2 Integer keys, string values. This is the format of the Geoids.dat file. 3 Integer keys, integer values. 10 String keys, string values. Ignore duplicate keys (use first one found). 11 String keys, integer values. Ignore duplicate keys (use first one found). 12 Integer keys, string values. Ignore duplicate keys (use first one found). 13 Integer keys, integer values. Ignore duplicate keys (use first one found).
See Also
Passport LookupTable Object | GeoID Dictionaries | LookupTable.Count | LookupTable.Key | LookupTable.KeyExists | LookupTable.LookupValue