SAVE VARIABLES

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 3


SAVE VARIABLES (document; variable{; variable2; ...; variableN})

ParameterTypeDescription
documentStringDocument in which to save the variables
variableVariableVariables to save

Description

The SAVE VARIABLES command saves one or several variables in the document whose name you pass in document.

The variables do not need to be of the same type, but have to be of type String, Text, Real, Integer, Long Integer, Date, Time, Boolean, or Picture.

If you supply an empty string for document, the standard Save File dialog box appears; the user can then choose the document to create. In this case, the 4D system variable Document is set to the name of the document if one is created.

If the variables are properly saved, the OK variable is set to 1. If not, OK is set to 0.

Note: When you write variables to documents with SAVE VARIABLES, 4th Dimension uses an internal data format. You can retrieve the variables only with the LOAD VARIABLES command. Do not use RECEIVE VARIABLE or RECEIVE PACKET to read a document created by SAVE VARIABLES.

WARNING: This command does not support array variables. Use the new BLOB commands instead.

Example

The following example saves three variables to a document named UserPrefs:

   SAVE VARIABLES ("User Prefs";vsName;vlCode;vgIconPicture)

System Variables or Sets

If the variables are saved 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, LOAD VARIABLES, System Variables, VARIABLE TO BLOB.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next