version 3
LOAD VARIABLES (document; variable{; variable2; ...; variableN})
Parameter | Type | Description | |
document | String | Document containing 4D variables | |
variable | Variable | Variables to receive the values |
Description
The LOAD VARIABLES command loads one or several variables from the document specified by document. The document must have been created using the command SAVE VARIABLES.
The variables variable, variable2...variableN are created; if they already exist, they are overwritten.
If you supply an empty string for document, the standard Open File dialog box appears, so the user can choose the document to open. If a document is chosen, the 4D system variable Document is set to the name of the document.
In compiled databases, each variable must be of the same type as those loaded from disk.
WARNING: This command does not support array variables. Use the new BLOB commands instead.
Example
The following example loads three variables from a document named UserPrefs:
LOAD VARIABLES ("User Prefs";vsName;vlCode;vgIconPicture)
System Variables or Sets
If the variables are loaded properly, the OK system variable is set to 1; otherwise it is set to 0.
See Also
BLOB TO DOCUMENT, BLOB TO VARIABLE, DOCUMENT TO BLOB, RECEIVE VARIABLE, VARIABLE TO BLOB.