In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to close the connection with jdbc". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how to close the connection with jdbc.
Public Boolean exeUpdateSql (String sql) {/ / log.info ("cliockhouse execute update sql:" + sql); Connection connection = getConn (); Statement statement = null; ResultSet results=null; try {statement = connection.createStatement (); results= statement.executeQuery (sql); return true;} catch (Exception e) {e.printStackTrace () MyExceptionUtils.getExceptionInfo (e); return false;} finally {if (connectionmakers null) {try {connection.close ();} catch (SQLException e) {e.printStackTrace (); return false } connection = null;} if (results) {try {results.close ();} catch (SQLException e) {e.printStackTrace (); return false } results = null;} if (statementality null) {try {statement.close ();} catch (SQLException e) {e.printStackTrace (); return false } statement = null;} Thank you for your reading. The above is the content of "how to close the connection with jdbc". After the study of this article, I believe you have a deeper understanding of how to close the connection with jdbc, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
It feels good. You can learn and improve yourself.
© 2024 shulou.com SLNews company. All rights reserved.