数据库操作后关闭语句? [英] Closing statement after database operation?
本文介绍了数据库操作后关闭语句?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
声明声明; 连接连接;
Statement statement; Connection connection;
每次执行以下数据库操作后,我将关闭连接.
I am closing connection after every database operation as below.
connection.close();
我创建了如下的语句对象.
i created statement object as below.
connection.createStatement(....)
我是否也需要关闭连接类似于连接关闭?
Do i need to close satement also similar to connection closing?
我的意思是我需要打电话给statement.close();吗?
如果不调用会发生什么?
What will happen if it is not called?
谢谢!
推荐答案
查看全文