User Tools

Site Tools


savefile_save_the_current_file_state_.htm
Navigation:  ABC Library Reference > FileManager > FileManager Methods >====== SaveFile (save the current file state) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

SaveFile

blk2blue.jpg

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

savefile_save_the_current_file_state_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1