Unless otherwise stated, all database functions return a database error number. All errors are guaranteed to be negative, so testing for negative numbers will test for all error conditions. Selected functions return a record number as well (which will be 0 or positive), so testing for non-negative numbers covers non-error situations.