|
at.glawar GlawarDataAdapter [2006-07-04] |
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||||
See:
Description
| Class Summary | |
| GLAFirebirdDataAdapter | Provides methods for creating a database connection to a Firebird database. |
| GLAMSSQLDataAdapter | Provides methods for creating a database connection to a Microsoft's SQL-Server 2000 or 2005. |
| GLAMySQLDataAdapter | Provides methods for creating a database connection to a MySQL database. |
| GLAOracleDataAdapter | Provides methods for creating a database connection to an Oracle database. |
Provides classes and methods to deal with database connection.
GLAOracleDataAdapter dbOracle = null;
try {
dbOracle = new GLAOracleDataAdapter("oracle.company.at", "1521", "db_name",
"db_username", "db_password");
con = dbOracle.getConnection();
pstmt = con.prepareStatement("select attribut from table where (attribut2 = ?)");
pstmtpstmtSub.setString(1, "WertName");
rs = pstmt.executeQuery();
while (rs.next()) {
System.out.println(rs.getString(1));
}
} catch (SQLException ex) {
GLAException.print(ex);
} finally {
if (rs != null) {
try {
rs.close();
rs = null;
} catch (Exception ex_nothing) {}
}
if (pstmt != null) {
try {
pstmt.close();
pstmt = null;
} catch (Exception ex_nothing) {}
}
if (con != null) {
try {
con.close();
con = null;
} catch (Exception ex_nothing) {}
}
}
|
software.glawar.at | ||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||||