dbms
Class DBConnection
java.lang.Object
dbms.DBConnection
public class DBConnection
- extends java.lang.Object
Methods to establish a connection to a database
Field Summary |
private java.sql.DatabaseMetaData |
dbm
|
private java.sql.Statement |
statement
|
Constructor Summary |
DBConnection(java.lang.String url,
java.lang.String driver,
java.lang.String user,
java.lang.String password)
Constructor |
Method Summary |
java.sql.DatabaseMetaData |
getDatabaseMetaData()
returns the current database meta data object |
java.sql.Statement |
getStatement()
returns the current statement object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
statement
private java.sql.Statement statement
dbm
private java.sql.DatabaseMetaData dbm
DBConnection
public DBConnection(java.lang.String url,
java.lang.String driver,
java.lang.String user,
java.lang.String password)
throws java.lang.ClassNotFoundException,
java.sql.SQLException
- Constructor
- Parameters:
url
- A url connection address (localhost)driver
- A driver locationuser
- A username for the dbmspassword
- a password for the dbms
- Throws:
java.lang.ClassNotFoundException
java.sql.SQLException
getStatement
public java.sql.Statement getStatement()
- returns the current statement object
- Returns:
- database statement object
getDatabaseMetaData
public java.sql.DatabaseMetaData getDatabaseMetaData()
- returns the current database meta data object
- Returns:
- DatabaseMetaDataObject