PowerBuilder · Database exception

SQLCode = 100 (Row Not Found / End of Result Set)

What does SQLCode = 100 (Row Not Found / End of Result Set) mean in PowerBuilder?

SQLCA.SQLCode returns 100 after a SELECT INTO or FETCH statement executes successfully but returns no row, which PowerBuilder treats as a normal end-of-data condition rather than a failure. It appears identically in the internal database interface trace as an 'Error 1 (rc 100)' entry after the last FETCH NEXT of a cursor.

SQLCode = 100 (Row Not Found / End of Result Set)PowerBuilder Classic · Appeon PowerBuilder

Condition

SQLCA.SQLCode returns 100 after a SELECT INTO or FETCH statement executes successfully but returns no row, which PowerBuilder treats as a normal end-of-data condition rather than a failure. It appears identically in the internal database interface trace as an 'Error 1 (rc 100)' entry after the last FETCH NEXT of a cursor.

Fix

Treat SQLCode = 100 as a distinct branch from both success (0) and failure (-1) instead of lumping it into general error handling, since code that only checks for SQLCode <> 0 will misreport a legitimate empty result as an error. Use it to drive 'no matching record' UI logic explicitly.

Related database exception