on 09-22-2006 6:47 PM
i am woking on MAM application of SAP MI
Hai,
how do you want to access the database.
u want code for JDBC.
Different 4 types of drivers r there.
give more info.
for MYSQL
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
}
catch (Exception exc) {
System.err.println("Exception in init(): Unable to load JDBC driver");
exc.printStackTrace();
}
try {
conn = DriverManager.getConnection("jdbc:mysql://localhost/" + DBNAME);
FOR ORACLE
// Connection conn = new oracle.jdbc.driver.OracleDriver().
// defaultConnection ();
Connection conn = DriverManager.getConnection(connStr,
"scott", "tiger");
Statement stmt = conn.createStatement ();
ResultSet rset = stmt.executeQuery ("SELECT DIVISION, COMPLAINT, " +
" CPU_CODE ,COMP_DT FROM scott.Bug ");
come back for more info.good luck
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.