Exception Handling

Scott Klement's open source interface to using JDBC database drivers from RPG. http://www.scottklement.com/jdbc/
Post Reply
iDevDaly
Posts: 5
Joined: Fri Jan 21, 2022 5:23 pm

Exception Handling

Post by iDevDaly »

When I run one of the JDBC_ExecPrep* functions, and it returns a result code of -1, how do I get more information about the root cause of the exception? Can we call the Java getMessage function from our program where we're calling the JDBCR4 subprocedure?
Scott Klement
Site Admin
Posts: 305
Joined: Sun Jul 04, 2021 5:12 am

Re: Exception Handling

Post by Scott Klement »

There should be a message in the job log. You'll want to look at the details of the message -- it should be an SQLException, and the details should tell you what caused the exception.
iDevDaly
Posts: 5
Joined: Fri Jan 21, 2022 5:23 pm

Re: Exception Handling

Post by iDevDaly »

Thanks. I'll look into it.
Post Reply