Package utils
Class DBUtils
- java.lang.Object
-
- utils.DBUtils
-
public class DBUtils extends Object
- Author:
- Bui Quoc Chinh
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckTable(String tableName)Check if a table already existsvoidcloseDB()voiddropTable(String tablename)voidexecUpdate(String sql)ConnectiongetConnection()UnusedvoidopenDB()voidopenDB(String dbName)voidshutdownDB()
-
-
-
Field Detail
-
con
public Connection con
-
rs
public ResultSet rs
-
stmt
public Statement stmt
-
-
Method Detail
-
openDB
public void openDB()
-
openDB
public void openDB(String dbName)
-
getConnection
public Connection getConnection()
Unused- Parameters:
sql-- Returns:
-
dropTable
public void dropTable(String tablename)
-
execUpdate
public void execUpdate(String sql)
-
checkTable
public boolean checkTable(String tableName)
Check if a table already exists- Parameters:
tableName-
-
closeDB
public void closeDB()
-
shutdownDB
public void shutdownDB()
-
-