用Java关闭数据库连接
Connection conn = DriverManager.getConnection(
"jdbc:somejdbcvendor:other data needed by some jdbc vendor",
"myLogin",
"myPassword" );Statement stmt = conn.createStatement();try {
stmt.executeUpdate( "INSERT INTO MyTable( name ) VALUES ( 'my name' ) " );} finally {
//It's important to close the statement when you are done with it
stmt.close();}
RISEBY
米琪卡哇伊
千万里不及你
随时随地看视频慕课网APP