This is a java compiler error. It is generated because you have referenced the myret variable outside the try block, and the variable only ever receives a value inside the try block. It is possible to get to the referencing code without going through the “insert” code, and in that case, the variable will not be initialized. To fix the error, move the referencing code inside the try block (for example, immediately following the insert statement).
Yes, but we need this information what is the meaning of the non-zero values, to insert this in our Servlet. I want to enable the servlet to put out readable errorcode, if something goes wrong. That is my intention!
If there is a problem an TInsertException exception is thrown. And you may use the APIs provided by TInsertException object to fetch the errorcode and the error message for the purpose.