If the
throwNrfEofExceptions property
is set to YES, a soft error (typically "no record found" or "end of
file") causes an exception to be thrown, allowing you to handle the
exception. If the property is set to NO (the default), no exception
is thrown, but your code can respond:
- If a get statement with or without a position option retrieves
data into a record, use the is or not operator to test
for soft errors. Here are skeletal examples:
// after a get statement, test for no record found
get myRecord01;
if ( myRecord01 is noRecordFound )
// respond
end
// in relation to a get statement with a next option,
// test for end of file
get next myRecord02;
while ( myRecord02 not endOfFile )
// process the record
get next myRecord02;
end
- After a SQL SELECT statement, check the value of the sysVar.sqldata.sqlcode field:
if ( sysVar.sqldata.sqlcode == 100 )
// respond
end
For further details, see "Exception handling."