Cannot catch trigger error

R

Rizwan

I have some INSERT statements on a table "PAYROLL" which I execute them as
batch. I am catching the SQLException in this case.

Statement stmt = ...;
try {
stmt.executeBatch();
stmt.clearBatch();
} catch (SQLException sqle) {
System.out.println( "SQLException= " + sqle.getMessage() );
sqle.printStackTrace();
}

Now there is an INSERT trigger on this table which can update one or more
table. I find out that if the trigger failed then the SQLException is not
catching it. Why it is doing like that?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top