4D v14.3

SAVE VARIABLES

Home

 
4D v14.3
SAVE VARIABLES

SAVE VARIABLES 


 

SAVE VARIABLES ( document ; variable {; variable2 ; ... ; variableN} )  
Parameter Type   Description
document  String in Document in which to save the variables
variable  Variable in Variables to save

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

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

If you pass 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, 4D uses an internal data format. You can retrieve the variables only with the LOAD VARIABLES command. Do not use RECEIVE PACKET or RECEIVE VARIABLE 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)

If the variables are saved properly, the OK system variable is set to 1; otherwise it is set to 0.

 
PROPERTIES 

Product: 4D
Theme: Variables
Number: 75

The OK variable is changed by the commandThis command modifies the system Document variable

 
HISTORY 

Created: < 4D v6

 
SEE ALSO 

BLOB TO DOCUMENT
BLOB TO VARIABLE
DOCUMENT TO BLOB
LOAD VARIABLES
System Variables
VARIABLE TO BLOB

 
ARTICLE USAGE

4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)