You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

SQLEXEC how do i trap errors from this eg -803 on insert

2 replies [Last post]
bosmanjc's picture
User offline. Last seen 8 years 7 weeks ago. Offline
Joined: 07/23/2010
Posts: 14

How do i trap the error after a sqlexec like this one:
SQLExec(SQL.Y_PWD_MGT_SQL_INS_002_A, Y_PWD_MGT_AET.EMPLID); /* insert inactive tl */

Lepa's picture
User offline. Last seen 8 weeks 2 days ago. Offline
Joined: 06/23/2008
Posts: 591
Re: SQLEXEC how do i trap errors from this eg -803 on insert

did you try to wrap that section of code with try and catch?

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

bosmanjc's picture
User offline. Last seen 8 years 7 weeks ago. Offline
Joined: 07/23/2010
Posts: 14
Re: SQLEXEC how do i trap errors from this eg -803 on insert

I did not, as i did not know how to before. I did get some examples. However, the try/catch will prevent the program from failing, but i might want to do something even after the failure. It appears if i do that, i might have to break the app engine step/action into more step/action/action. What do you think?