SetFieldStore Function (Logic) |
Namespace: XSharp.Core
1PRIVATE LName 2LName := "MyMemVar" 3USE Test 4? Test->LName // OldField 5// This refers to the PRIVATE variable called LName: 6? LName // MyMemVar 7// Default setting is FALSE 8? SetFieldStore() // FALSE 9// Since SetFieldStore() is FALSE, this will 10// assign a value to the PRIVATE memory variable called LName 11LName := "NewVal" 12? Test->LName // OldField 13? LName // NewVal 14? SetFieldStore(TRUE) 15 // FALSE (returns previous setting) 16// Since SetFieldStore() is TRUE, this will 17// assign a value to the database field called LName 18LName := "NewestVal" 19? Test->LName // NewestVal 20// This still refers to the PRIVATE variable called LName: 21? LName // NewVal