User Tools

Site Tools


tryprevious_try_to_get_previous_record_in_sequence_.htm
Navigation:  ABC Library Reference > FileManager > FileManager Methods >====== TryPrevious (try to get previous record in sequence) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

TryPrevious, PROC

blk2blue.jpg

The TryPrevious method gets the previous record in sequence. The TryPrevious method does not attempt to handle errors that occur while getting the previous record.

The Previous method provides a slightly different (automatic) alternative for getting records in sequence.

Implementation:

TryPrevious tries to get the previous record. If it succeeds, it returns Level:Benign (declared in ABERROR.INC). If it fails, it returns the severity level of the error it encountered while trying to get the record. See Error Class for more information on severity levels.

Return Data Type:     BYTE

Example:

PROGRAM  BatchReport               !batch report–don't display errors

INCLUDE('ABFILE.INC')             !declare FileManager class

MAP                               !program map

END

GlobalErrors ErrorClass            !declare GlobalErrors object

Access:Client CLASS(FileManager)   !derive Access:Client object

             END

CODE

!program code

LOOP                              !loop through client file

 CASE Access:Client.TryPrevious() !get previous record in sequence

 OF Level:Notify OROF Level:Fatal !if error occurred

  POST(Event:CloseWindow)         !shut down

  BREAK

 ELSE                             !otherwise

  PRINT(Rpt:Detail)               !print the record

 END

END

See Also:     Previous , PREVIOUS

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