Jaidev Arer wrote:Below is one of the function to update in DAO. Can you please go through the code and let me know whether the database connection is closed properly or not. And also let me know if there is any changes required in code.
Thanks for your valuable time.
The code snippet you have given is incomplete ...
you are calling
getconnection() to get the connection ... is it a static method ?
you should have used
if (con != null) con.close(); instead of con.close() and for for closing you prepared statement object also...
and why you are returning
null ??? ...