public class JDBC_DB extends Object
Modifier and Type | Field and Description |
---|---|
String |
TO_DATE_FORMAT |
Constructor and Description |
---|
JDBC_DB(Properties sys_props)
JDBC_DB
Constructor method will create class instance and load the
Oracle DB driver
|
JDBC_DB(Properties sys_props,
Connection srv_connect) |
Modifier and Type | Method and Description |
---|---|
void |
closeConnection()
closeConnection
Close a connection to the database.
|
void |
commit()
commit
|
ResultSet |
executeQuery(String cmd)
executeQuery
Send an SQL query to the DBMS to be executed.
|
void |
executeSQLCommand(String cmd)
executeSQLCommand
Send an SQL command to the DBMS to be executed.
|
protected void |
finalize() |
Connection |
getConnection() |
int |
getCount(String cmd)
getCount
Will return a count when user passes sting select count(*) from ...
|
void |
openConnection()
openConnection
Open a connection to the database.
|
void |
openConnection(String username,
String password,
String database) |
void |
rollback()
rollback
|
void |
setAutoCommitMode(boolean autoCommitMode) |
String |
toDateStr(Date inDate)
Convert Date to string in format for
Oracle TO_DATE processing - DD-MM-YY HH24:MI:SS
|
public final String TO_DATE_FORMAT
public JDBC_DB(Properties sys_props) throws SQLException
SQLException
public JDBC_DB(Properties sys_props, Connection srv_connect) throws SQLException
SQLException
public void setAutoCommitMode(boolean autoCommitMode)
public void openConnection() throws SQLException
SQLException
public void openConnection(String username, String password, String database) throws SQLException
SQLException
public void closeConnection()
public void executeSQLCommand(String cmd) throws SQLException
SQLException
public ResultSet executeQuery(String cmd) throws SQLException
SQLException
public int getCount(String cmd) throws SQLException
SQLException
public void commit() throws SQLException
SQLException
public void rollback()
protected void finalize() throws Throwable
public String toDateStr(Date inDate)
public Connection getConnection() throws SQLException
SQLException
Copyright © 1999-2014 Apache OODT. All Rights Reserved.