if sqlcode is not 0 (in oracle plsql) then always throw an exception?
makes sense to ask for SQLCODE if not is an exepcion. Example:
if (sqlcode = 0) ...
if sqlcode is not 0 (in oracle plsql) then always throw an exception?
makes sense to ask for SQLCODE if not is an exepcion. Example:
if (sqlcode = 0) ...
IF you are asking if you should always throw an exception if SQLCODE is not zero, not always.
Here is a list of some SQLCodes. As you can see, some SQLCodes ( such as 100 ) do not necessarily mean that there is an error.
Hope this helps
Looks like you're mixing error checking and exception handling. SQLCODE, by definition, only makes sense inside an exception handler.
Raising exceptions happens automatically. Unless your code is catching exceptions and returning them instead of re-raising them. Which kind of ruins the whole point of exception handling.