This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Any Possibilities to get other than SQLException while using executeUpdate() method
BalaiahRaju ChamarthiRaju
Greenhorn
Joined: Sep 18, 2007
Posts: 13
posted
0
Hi,
I am Using PreparedStatement to insert Record into database. after calling executeUpdate() method. I am writing finally block to close all the stmt,rs..
Record is inserting into Database.. but I am getting Exception.. how it is possible..
is there any possible to get otherthan SQLException. please let me know..
------------ in the above code, the record is inserting into database, after that it is throwing SQLException, I think this is throwing in finally block.. can you tell me is this possible. and is there any chaces to get other than SQLException.
Bala, The finally block delegates to the method DbUtils.closeQuietly(stmt). What does that do? One thing that is suspicious is that I can't see where/how the connection is closed. Maybe you have a connection leak?
Posting the actual SQL Exception text might give more clues.