Navigation: ABC Library Reference > FileManager > FileManager Methods >====== SaveFile (save the current file state) ====== | |
SaveFile
The SaveFile method saves the managed file's current state and returns a number that uniquely identifies the saved state. SaveFile saves the managed file's state for subsequent restoration by the RestoreFile method.
Implementation:
The SaveFile method saves file position, as well as any active HOLD or WATCH. SaveFile calls the SaveBuffer method to save a copy of the managed file's record buffer contents.
Return Data Type: USHORT
Example:
SaveState USHORT !must be a USHORT
CODE
SaveState = Access:MyFile.SaveFile() !save the file state
SET(MyKey,MyKey) !access the file (change the file state)
LOOP UNTIL Access:MyFile.Next()
!Check range limits here
!Process the record here
END
Access:MyFile.RestoreFile(SaveState) !restore the previously saved file state
See Also: RestoreFile, SaveBuffer