|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdbpackage.DbMethods
| Field Summary | |
static boolean |
DEBUG
|
| Constructor Summary | |
DbMethods()
|
|
| Method Summary | |
java.sql.ResultSet |
executeQuery(java.sql.Connection con,
java.lang.String sqlStatement)
This method executes a select statement and returns the result. |
void |
executeUpdate(java.sql.Connection con,
java.lang.String sqlStatement)
This method executes an update statement |
boolean |
fieldExists(java.sql.Connection con,
java.lang.String tablename,
java.lang.String key,
java.lang.String colname,
java.lang.String sel)
This method checks to see if a field exists in the database |
java.sql.Connection |
getConnection(java.lang.String host,
java.lang.String database)
Returns a connection to the MySQL database |
boolean |
tableExists(java.sql.Connection con,
java.lang.String name)
This method check to see if a table exists in the database |
void |
testDriver()
Checks whether the MySQL JDBC Driver is installed |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final boolean DEBUG
| Constructor Detail |
public DbMethods()
| Method Detail |
public void testDriver()
throws java.lang.Exception
java.lang.Exception
public java.sql.Connection getConnection(java.lang.String host,
java.lang.String database)
throws java.lang.Exception
host - the name of the hostdatabase - the name of the database
java.lang.Exception
public void executeUpdate(java.sql.Connection con,
java.lang.String sqlStatement)
throws java.lang.Exception
con - database connectionsqlStatement - SQL DDL or DML statement to execute
java.lang.Exception
public java.sql.ResultSet executeQuery(java.sql.Connection con,
java.lang.String sqlStatement)
throws java.lang.Exception
con - database connectionsqlStatement - SQL SELECT statement to execute
java.lang.Exception
public boolean tableExists(java.sql.Connection con,
java.lang.String name)
con - database connectionname - SQL SELECT statement to execute
public boolean fieldExists(java.sql.Connection con,
java.lang.String tablename,
java.lang.String key,
java.lang.String colname,
java.lang.String sel)
con - database connectiontablename - the name of the tablekey - is the field you are looking forcolname - the column the field is insel - what you are looking for
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||