public class JDBCUtils extends Object
| 构造器和说明 |
|---|
JDBCUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
closeResource(Connection conn,
ResultSet rs,
PreparedStatement st) |
static void |
closeResource(Connection conn,
Statement st) |
static void |
closeResource(ResultSet rs,
PreparedStatement st) |
static Connection |
getConnection(String driverName,
String url,
String user,
String password) |
static String |
getDriverType(String url) |
public static Connection getConnection(String driverName, String url, String user, String password) throws Exception
Exceptionpublic static void closeResource(Connection conn, Statement st) throws SQLException
SQLExceptionpublic static void closeResource(Connection conn, ResultSet rs, PreparedStatement st) throws SQLException
SQLExceptionpublic static void closeResource(ResultSet rs, PreparedStatement st) throws SQLException
SQLExceptionCopyright © 2019-Now–2020. All rights reserved.