I noticed with testing nextrow/previousrow procedures in a grid i noticed that both procedures give an error when you reach the last or first record. Error is record 0 does not exist, or record xxx does not exist. Is it possible to check if the record number exists and if it does not exist, just do nothing? I think this would be much more user friendly.

asked 24 Feb '12, 05:37

asdr's gravatar image

asdr ♦
accept rate: 8%

Yes, it is possible. nextRow and previousRow APIs raises e_invalidRowNumber exception if the current row is already the last row or the first row. Below is the sample of how to handle exceptions:
begin api_datasource.nextRow('ds1'); exception when api_exception.e_invalidRowNumber then null; end;


answered 24 Feb '12, 05:42

Ugur%20Kocak's gravatar image

Ugur Kocak ♦
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 24 Feb '12, 05:37

Seen: 1,564 times

Last updated: 24 Feb '12, 05:42

© Copyright Gerger 2017