LookupLoad

This function loads an external file — typically, a delimited text file — that can be used to look up table values. One column of the file is designated as the keywords column, and another column is designated as the values column.

Function Group Execution Windows Embedded Thin Client
LookupLoad File Synchronous Supported Supported Supported

Syntax

LookupLoad(strFileName,numColKey,numColValue,strDelimiters)
strFileName
The file path and name of the external file.
numColKey
The number of the column/field that contains the keywords.
numColValue
The number of the column/field that contains the desired values.
strDelimiters
The delimiter that separates the columns/fields.

Returned value

This function returns the number of rows/lines in the specified file.

If the specified file cannot be found, then this function returns a negative number as an error code.

Notes

This function only loads the specified file; it doesn't do anything with the file. To use the file, call the LookupContains and LookupGet functions.

Also, to load another file, simply call this function again. Only one file can be loaded at a time, however; the new file replaces the old in the project's memory.

Examples

LookupLoad( "C:\Temp\customerlist.csv", 1, 4, "," )