Is there a reason why calling %ExecDirect() (or %Execute) won't set the %SQLCODE of the result set to 100 even when the query returns no data?
Here is the code in question with a bit of contrivance to force the issue:
set statement = ##class(%SQL.Statement).%New()
set result = ##class(%SQL.Statement).%ExecDirect(statement,"select top 0 0 from Example.Testing")
w result.%SQLCODE
The %SQLCODE is set to 0 in this case. The same happens if I use %Prepare and %Execute, e.g.