SAVE TO myvar.dat Restore from myvar.datBut according to me better will be to have the same table opened as shared between instances and to have the following code for saving data
* update code SET REPROCESS TO 2 SECONDS IF !Used([MyVars]) Then SELECT 0 USE MyVars SHARED Else SELECT MyVars EndIF IF FLOCK(ALIAS()) Then Locate for VarName=[VariableToUpdate] Replace VarValue with VarToMemo(m.VariableToUpdate) UNLOCK IN (ALIAS()) ENDIFVarToMemo() is supposed to convert variable to textual expression so that it can be stored in a memo. For example it can be conversion to Evaluate expression (when you call evaluate function over such expression you recieve the original value).
[DATETIME(]+; transform(Year(myDateTime))+[,]+; transform(Month(myDateTime))+[,]+; transform(Day(myDateTime))+[,]+; transform(Hour(myDateTime))+[,]+; transform(Minute(myDateTime))+[,]+; transform(Sec(myDateTime))+[)]String values are converted like this
["]+Strtran(MyString,["],["+chr(34)+"])+["](Note that you may have problems with string values longer than 255 characters.)
IF !Used([MyVars]) Then SELECT 0 USE MyVars SHARED Else SELECT MyVars EndIF Replace VarName with VarName &&This to force VFP to purge its cursor memory cache Locate for VarName=[VariableToRead] m.VariableToRead = MemoToVar(VarValue)MemoToVar() is supposed to be the reverse function of VarToMemo()
Make solutions, not programs!