databasedisconnection.java~1~

来自「本系统图书馆管理系统」· JAVA~1~ 代码 · 共 32 行

JAVA~1~
32
字号
package databaseoperate;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2005</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class DatabaseDIsconnection {
    try {
              if(statement != null) {
                  statement.close();                                  // 关闭Statement接口实例
              }
              if(connection != null) {
                  connection.close();                                 // 关闭Connection接口实例
              }
          }
          catch (SQLException ex)  {
              System.out.println("\nERROR:----- SQLException -----\n");
              System.out.println("Message:   " + ex.getMessage( ));
              System.out.println("SQLState:  " + ex.getSQLState());
              System.out.println("ErrorCode: " + ex.getErrorCode());
          }

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?