DATASAVE data=$d_UserFlag;$d_MacroFlag … your commands here DATARESTORE data=$d_UserFlag;$d_MacroFlag |
#Save UserFlags for the whole database $status = sqlite("sql","create table UserFlagSave as select code,userflag from caches") $status = sqlite("sql","create unique index UserFlagCode on UserFlagSave (code)") # not required, but recommended as this will speed up the update (especially noticeable if the database is large) # do some action that updates user flags #...... #Now restore userflags for the whole database $status = sqlite("sql","update caches set userflag = (select userflag from UserFlagSave where UserflagSave.code = Caches.code)") $stauts = sqlite("sql","drop table UserFlagSave") Resync |