User Tools

Site Tools


next_get_next_record_in_sequence_.htm
Navigation:  ABC Library Reference > FileManager > FileManager Methods >====== Next (get next record in sequence) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

Next, PROC

blk2blue.jpg

The Next method gets the next record in sequence. The Next method handles any errors, except end of file, that occur while getting the record.

The TryNext method provides slightly different (manual) alternative for getting records in sequence.

Implementation:

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

Return Data Type:     BYTE

Example:

PROGRAM

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

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

      END

CODE

!program code

LOOP                                  !loop through client file

 CASE Access:Client.Next()            !get next 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:     TryNext , NEXT

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