In the Xojo docs for SelectSQL it states
If the SQL does not return data then Nil is returned. Nil is also usually returned if there is an error in the SQL statement, but you should instead catch the DatabaseException to check if an error occurred.
The first sentence is incorrect. If the query is valid but doesn’t return any rows, then the result is an empty RowSet, not a Nil one.
But my question is, is there any situation where the RowSet could be Nil without a DatabaseException being raised? I see a lot of code posted where they’re checking for Nil while also catching for DatabaseException, and I have been too, for the most part. But is this really necessary? I think not, and it’s just a carryover habit from API 1 (SQLSelect with RecordSet). In fact, that incorrect sentence is identical to the one for SQLSelect.
Just trying to reduce/simplify my code.