I tried this in OnAfterInsert event
//after the insert of a new record into the table behind the form I use the following code in order to insert a new record into an another table…
sc_exec_sql(insert into tb…);
sc_error_continue(“insert”) ;
if (!empty({sc_error_insert})) {
sc_rollback_trans();
sc_error_message({sc_error_insert});
sc_error_exit();
//sc_redir(form_appl,"_parent");
}
else {
sc_commit_trans();
}
Unfortunately when the error occur it seems that my code is not executed.The application show the error in a page white and is not possible to redirect or exit.
What can I do to manage the DB error in SC ?